}
sub markdown {
+ return if !Bugzilla->feature('markdown');
+
require Bugzilla::Markdown;
return $_[0]->request_cache->{markdown} ||= Bugzilla::Markdown->new();
}
my $text = shift;
my $user = Bugzilla->user;
- if (Bugzilla->feature('markdown')
- && $user->settings->{use_markdown}->{is_enabled}
+ if ($user->settings->{use_markdown}->{is_enabled}
&& $user->setting('use_markdown') eq 'on')
{
return $self->SUPER::markdown($text, @_);
my $text = shift;
return unless $text;
- if ((ref($comment) eq 'HASH' && $comment->{is_markdown})
- || (ref($comment) eq 'Bugzilla::Comment' && $comment->is_markdown))
+ if (Bugzilla->feature('markdown')
+ && ((ref($comment) eq 'HASH' && $comment->{is_markdown})
+ || (ref($comment) eq 'Bugzilla::Comment' && $comment->is_markdown)))
{
return Bugzilla->markdown->markdown($text);
}