Browse Source

Markdown.pl: recognize two ```-delimited blocks in a row

Backticks-delimited code blocks do not require a blank line
between them to be recognized (at least they're not supposed
to).

Recognize two such code blocks in a row by tweaking the
regex to use an assertion instead of an explicit match.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
master
Kyle J. McKay 7 years ago
parent
commit
1e640c9f45
  1. 2
      Markdown.pl

2
Markdown.pl

@ -477,7 +477,7 @@ sub _HashBTCodeBlocks {
my $text = shift;
$text =~ s{
(?:\n|\A)
(?:(?<=\n)|\A)
``(`+)[ \t]*(?:([\w.+-]+)[ \t]*)?\n
( # $3 = the code block -- one or more lines, starting with ```
(?:

Loading…
Cancel
Save