Browse Source

Markdown.pl: recognize adjacent standalone comments together

Combine adjacent (i.e. no separating blank line) standalone
XML comments into the same "block".

This is more efficient, better preserves the original comment
formatting and avoids an unfortunate side-effect that could
introduce unwanted extra paragraphs into the output.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
master
Kyle J. McKay 4 years ago
parent
commit
c1f488d9f7
  1. 6
      Markdown.pl

6
Markdown.pl

@ -827,6 +827,12 @@ sub _HashHTMLBlocks {
<!--
(?:[^-]|(?:-(?!-)))*
-->
(?:
(?:[ \t]*\n[ \t]*)?
<!--
(?:[^-]|(?:-(?!-)))*
-->
)*
)
[ ]*
(?=\n{1,}|\Z) # followed by end of line or end of document

Loading…
Cancel
Save