Inline HTML legalities
John MacFarlane
jgm at berkeley.edu
Wed Nov 30 12:28:31 EST 2011
+++ Andy Bennett [Nov 30 11 14:27 ]:
> Furthermore, the syntax document does not mandate the user to indent the
> block contents, although the example implies it:
>
> -----
> <div>
> <div>
> Test nested HTML without indents
> </div>
> </div>
> -----
> becomes
> -----
> <div>
> <div>
> Test nested HTML without indents
> </div>
>
> <p></div></p>
Note that John Gruber released a beta version of Markdown that
fixes this bug (I believe it uses perl's Text::Balanced module).
You can find it by searching the list.
% Markdown.pl --version
This is Markdown, version 1.0.2b8.
Copyright 2004 John Gruber
http://daringfireball.net/projects/markdown/
% Markdown.pl
<div>
<div>
Test nested HTML
</div>
</div>
^D
<div>
<div>
Test nested HTML
</div>
</div>
Have you considered using a PEG instead of regexes? There are PEGs
for markdown, and there seems to be a nice PEG generator for scheme:
http://planet.plt-scheme.org/display.ss?package=peg.plt&owner=kazzmir
John
More information about the Markdown-Discuss
mailing list