Commit 5d5c1cfd authored by Albert Ting's avatar Albert Ting Committed by Dylan Hardison

Bug 1205415 - Markdown incorrectly parses BlockQuote inside a CodeBlock

r=dylan
parent 34092dea
...@@ -420,10 +420,17 @@ sub _DoCodeSpans { ...@@ -420,10 +420,17 @@ sub _DoCodeSpans {
return $text; return $text;
} }
# Override to add GFM Fenced Code Blocks # Override to delay after DoBlockQuotes
sub _DoCodeBlocks { sub _DoCodeBlocks {
my ($self, $text) = @_; my ($self, $text) = @_;
return $text;
}
# add GFM Fenced Code Blocks
sub _DoDelayCodeBlocks {
my ($self, $text) = @_;
$text =~ s{ $text =~ s{
^ (${\FENCED_BLOCK}|${\INDENTED_FENCED_BLOCK}) ^ (${\FENCED_BLOCK}|${\INDENTED_FENCED_BLOCK})
}{ }{
...@@ -469,6 +476,7 @@ sub _DoBlockQuotes { ...@@ -469,6 +476,7 @@ sub _DoBlockQuotes {
"<blockquote class=\"markdown\">\n$bq\n</blockquote>\n\n"; "<blockquote class=\"markdown\">\n$bq\n</blockquote>\n\n";
}egmx; }egmx;
$text = $self->_DoDelayCodeBlocks($text);
return $text; return $text;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment