Minor regexp oversight for setext headings

Rad Geek technophilia at radgeek.com
Mon Oct 9 02:11:34 EDT 2006


Michel Fortin wrote:

> Le 8 oct. 2006 à 13:24, John Gruber a écrit :

>> So while we're fixing Setext-style headings, here are my thoughts

>> on how to make them less ambiguous. One overall problem in

>> Markdown 1.0's syntax is that it isn't clear when you need blank

>> lines to separate block-level constructs.

>>

>> I feel strongly now that this was a mistake, and that the rules

>> should be tightened such that all (or nearly all -- there may be

>> worthwhile exceptions I haven't considered) block level constructs

>> must be both preceded and succeeded by a blank line. (Or they must

>> occur at the start or end of the document, of course.)

>

> As much as I agree with you, I tend to believe it'll break backward

> compatibility for a couple of people. I've seen this a couple of times:

>

> Paragraph...

>

> Header

> ======

> Paragraph...

>

>

> although I don't remember exactly where. So I think this should be kept

> working.


For what it's worth, I use this syntax pretty often. Largely because it
looks prettier to me than the gappy, spread-out version:

Paragraph

Header
======

Paragraph

For the Setext-style headings I'd be inclined to say that the
underlining (which is on bottom, but not on top) creates a clear
asymmetry between how close you can put text on the top and how close
you can put text on the bottom without the header ceasing to be separate
from the text that surrounds it. It would make perfect sense to change
the rules such that a you need an empty line between a header and the
block *above* it; much less sense to change them such that you need an
empty line between the header and the block *underneath* it. The
underlining has already established the separation between the two block
elements.

-C




More information about the Markdown-Discuss mailing list