diff options
author | Albert Ting <altlist@gmail.com> | 2016-05-20 19:48:56 +0200 |
---|---|---|
committer | Dylan Hardison <dylan@mozilla.com> | 2016-05-20 19:49:12 +0200 |
commit | 5d5c1cfdb12050176825b4e1e28808a708dea58b (patch) | |
tree | 49828a619d68a45e420be018437daa4dc9cba57f /Bugzilla | |
parent | 34092dea402579148d647d222051a547ab143c53 (diff) | |
download | bugzilla-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.pm | 10 |
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; } |