diff --git a/Markdown.pl b/Markdown.pl
index 6336bc8..66098f2 100755
--- a/Markdown.pl
+++ b/Markdown.pl
@@ -1472,8 +1472,8 @@ sub _HashBTCodeBlocks {
$codeblock = "
";
- my $key = block_id($codeblock);
- $g_html_blocks{$key} = $codeblock;
+ my $key = block_id($codeblock, 2);
+ $g_code_blocks{$key} = $codeblock;
"\n\n" . $key . "\n\n";
}egmx;
@@ -1768,6 +1768,11 @@ sub _RunBlockGamut {
}
+sub _DoBTListBlocks {
+ return _DoBlockQuotes(_DoCodeBlocks(_HashBTCodeBlocks($_[0]))) if $_[0] ne "";
+}
+
+
sub _DoListBlocks {
return _DoBlockQuotes(_DoCodeBlocks($_[0])) if $_[0] ne "";
}
@@ -2776,11 +2781,11 @@ sub _DoListsAndBlocks {
while ($parse =~ /\G(?s:.)*?^$whole_list/gmc) {
my @captures = ($1, $2, $3, $4);
if ($-[1] > $-[0]) {
- $text .= _DoListBlocks(substr($parse, $-[0], $-[1] - $-[0]));
+ $text .= _DoBTListBlocks(substr($parse, $-[0], $-[1] - $-[0]));
}
$text .= &$list_item_sub(@captures);
}
- $text .= _DoListBlocks(substr($parse, pos($parse))) if pos($parse) < length($parse);
+ $text .= _DoBTListBlocks(substr($parse, pos($parse))) if pos($parse) < length($parse);
}
else {
my $parse = $text;
diff --git a/syntax.md b/syntax.md
index cab9073..2856293 100644
--- a/syntax.md
+++ b/syntax.md
@@ -769,10 +769,6 @@ A code block continues until it reaches a line that is not indented
until a line consisting of the same number of backtick quotes is found
when using the 3 backtick quotes technique.
-Note that the 3 backtick quotes (or more) must appear at the beginning
-of the line. To include a code block within a list (or other indented
-element), the indentation technique must be used.
-
Also note that within a backticks-delimited code block, tab characters
are always expanded with the tab stop locations 8 characters apart.