summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorAlbert Ting <altlist@gmail.com>2016-05-20 19:48:56 +0200
committerDylan Hardison <dylan@mozilla.com>2016-05-20 19:49:12 +0200
commit5d5c1cfdb12050176825b4e1e28808a708dea58b (patch)
tree49828a619d68a45e420be018437daa4dc9cba57f /Bugzilla
parent34092dea402579148d647d222051a547ab143c53 (diff)
downloadbugzilla-5d5c1cfdb12050176825b4e1e28808a708dea58b.tar.gz
bugzilla-5d5c1cfdb12050176825b4e1e28808a708dea58b.tar.xz
Bug 1205415 - Markdown incorrectly parses BlockQuote inside a CodeBlock
r=dylan
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Markdown.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Markdown.pm b/Bugzilla/Markdown.pm
index 2951cd457..72e788fd0 100644
--- a/Bugzilla/Markdown.pm
+++ b/Bugzilla/Markdown.pm
@@ -420,10 +420,17 @@ sub _DoCodeSpans {
return $text;
}
-# Override to add GFM Fenced Code Blocks
+# Override to delay after DoBlockQuotes
sub _DoCodeBlocks {
my ($self, $text) = @_;
+ return $text;
+}
+
+# add GFM Fenced Code Blocks
+sub _DoDelayCodeBlocks {
+ my ($self, $text) = @_;
+
$text =~ s{
^ (${\FENCED_BLOCK}|${\INDENTED_FENCED_BLOCK})
}{
@@ -469,6 +476,7 @@ sub _DoBlockQuotes {
"<blockquote class=\"markdown\">\n$bq\n</blockquote>\n\n";
}egmx;
+ $text = $self->_DoDelayCodeBlocks($text);
return $text;
}