Minor regexp oversight for setext headings
Trevor Jim
tjim at mac.com
Mon Oct 9 00:04:38 EDT 2006
John Gruber <gruber at fedora.net> wrote:
> it isn't clear when you need blank
> lines to separate block-level constructs.
>
> I feel strongly now that this was a mistake
I can say that in writing Make.text this was something that
I ran into immediately. So I had to figure out the rules
for when to put a blank line in, and the code has to keep
track of state to figure out whether to insert a blank line
when translating a <li>, <h2>, <blockquote>, etc. And, the
current version does not do a perfect job, I'm going to have
to make the algorithm a bit more complicated to do that.
I think your proposed change would simplify things for Make.text.
You probably shouldn't change things to make it easier for
mechanical converters, though :-).
On the other hand, the complexity of a mechanical converter
like Make.text is probably an indication of the complexity
of understanding the rules for a human.
Q: are you saying that
* foo
* bar
* baz
will become
* foo
* bar
* baz
under your proposal? And if so, will there be an equivalent
to the current
* foo
* bar
(which differs from
* foo
* bar
by an additional <p>)?
(BTW I also ran into the issue you mentioned previously
about ']' in link contents. Writing Make.text has definitely
been useful for finding these issues.)
-Trevor
More information about the Markdown-Discuss
mailing list