multiline header

Waylan Limberg waylan at gmail.com
Mon Mar 1 18:12:25 EST 2010


On Mon, Mar 1, 2010 at 4:22 PM, Alexandre Leray
<alexandre at alexandreleray.com> wrote:

> Hi,

>

> first of all thanks for such a great syntax, so far it's the best I know!

>

> I have a document with quite long titles and I was wondering if it was

> possible to hard-break them:

>


You know, at first I was going to say that multi-line headers are
explicitly forbidden. Then I checked the syntax document and it says
nothing of the sort, However, as far as I know, every implementation
works that way - probably because markdown.pl works that way.

However, if they were supported, there would be a few ambiguities:

Which of these are a multi-line header:

Line one of header
Line two of header
=============

Line one of header
=============
Line two of header
=============

Currently, it is known by many authors that Markdown allows headers to
not have blank lines before and/or after them. So, there could be
documents in which the author intended the first line in the first
example to be a paragraph - as it would be parsed now. And the author
could have intended the second example to actually be two separate
headers.

Even hash header could have this problem:

# Line one of header
Is this line 2 or a new paragraph?

In the thousands of existing documents out there, that second line is
expected to be a new paragraph, not part of the header.

And that's the problem, lazy authors have been relying on the existing
behavior for so long that changing it now could break thousands of
existing documents.


--
----
\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg


More information about the Markdown-Discuss mailing list