diff options
author | David Lawrence <dkl@mozilla.com> | 2014-11-04 21:46:41 +0000 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-11-04 21:46:41 +0000 |
commit | f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f (patch) | |
tree | b95c7e398739df2b8447d93a32a1b10f2c9fc2e7 /Bugzilla/Template.pm | |
parent | fc62fd4082c76068c2062f4e50b88c0908db2be2 (diff) | |
download | bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.tar bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.tar.gz bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.tar.bz2 bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.tar.xz bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.zip |
Revert Bug 330707 - Add optional support for MarkDown
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 7ce1be72b..bb8ff3b74 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -148,11 +148,10 @@ sub get_format { # If you want to modify this routine, read the comments carefully sub quoteUrls { - my ($text, $bug, $comment, $user, $bug_link_func, $for_markdown) = @_; + my ($text, $bug, $comment, $user, $bug_link_func) = @_; return $text unless $text; $user ||= Bugzilla->user; $bug_link_func ||= \&get_bug_link; - $for_markdown ||= 0; # We use /g for speed, but uris can have other things inside them # (http://foo/bug#3 for example). Filtering that out filters valid @@ -223,11 +222,10 @@ sub quoteUrls { $text = html_quote($text); - unless ($for_markdown) { - # Color quoted text - $text =~ s~^(>.+)$~<span class="quote">$1</span >~mg; - $text =~ s~</span >\n<span class="quote">~\n~g; - } + # Color quoted text + $text =~ s~^(>.+)$~<span class="quote">$1</span >~mg; + $text =~ s~</span >\n<span class="quote">~\n~g; + # mailto: # Use |<nothing> so that $1 is defined regardless # @ is the encoded '@' character. @@ -858,24 +856,6 @@ sub create { 1 ], - markdown => [ sub { - my ($context, $bug, $comment, $user) = @_; - return sub { - my $text = shift; - return unless $text; - - if (Bugzilla->feature('markdown') - && ((ref($comment) eq 'HASH' && $comment->{is_markdown}) - || (ref($comment) eq 'Bugzilla::Comment' && $comment->is_markdown))) - { - return Bugzilla->markdown->markdown($text); - } - return quoteUrls($text, $bug, $comment, $user); - }; - }, - 1 - ], - bug_link => [ sub { my ($context, $bug, $options) = @_; return sub { |