From a390726d4a7c3b09adf51ae95cb91d66880cf3b5 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sat, 5 Sep 2015 01:48:35 -0700 Subject: [PATCH] Markdown.pl: relax ``` matching rule Allow extra spaces after the ``` (but not before it). Signed-off-by: Kyle J. McKay --- Markdown.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Markdown.pl b/Markdown.pl index 1388bad..b4b8a99 100755 --- a/Markdown.pl +++ b/Markdown.pl @@ -972,13 +972,13 @@ sub _DoCodeBlocks { $text =~ s{ (?:\n|\A) - ``(`+)\w*\n + ``(`+)[ \t]*(?:[\w.-]+[ \t]*)?\n ( # $1 = the code block -- one or more lines, starting with ``` (?: .*\n+ )+? ) - (?:(?:``\1(?:\n|\Z))|\Z) # and ending with ``` or end of document + (?:(?:``\1[ \t]*(?:\n|\Z))|\Z) # and ending with ``` or end of document }{ my $codeblock = $2; my $result; # return value