doesn't that make you wonder?

Allan Odgaard 1EDF4D33-D1B1-4C97-A393-3D2B4EE5E095+Markdown at
Tue Oct 18 04:10:56 EDT 2011

On 18 Oct 2011, at 01:47, John MacFarlane wrote:

> […] I have argued before on this list that the "four space rule" is implicit in the markdown syntax specification. But it's not quite explicit, hence the trouble.

Maybe I am misunderstanding your reference but the specification¹ seems fairly explicit:

| List items may consist of multiple paragraphs.
| Each subsequent paragraph in a list item must
| be indented by either 4 spaces or one tab


> So you may find that what is a nested list on one markdown

> implementation is a single-level list on another.

Adding to that, whether or not the list items are wrapped with <p>.

> I made the case long ago that there should be a formal grammar for markdown, but the idea was never popular on this list.

I think there are many who would like to see a formal/exhaustive specification, and no-one can be happy about say, text editor syntax highlight doing it one way, the local preview showing it another, and when posting the document online, yet another interpretation is applied.

The problem is partly that several want it to be about the user, so it doesn’t matter there are 30 lines of code to try and guess what the user meant, rather than have the user be more explicit (it is after all meant as sort of an anti-markup language).

Another problem is that the majority of derivatives are implemented as a long series of global substitutions running on the full document — this is far from a “real” parser so the maintainers will have to start from scratch, and it’s unlikely they can provide 100% backwards compatibiity for their flavor of markdown, leading to close to no uptake.

If we want a formal specification, I think the best approach is a clean break from markdown. There are anyway stuff which is actually in the current specification, which for me is quite a gotcha, like lazy-mode for nested block quotes (so decreasing quote level has the higher level persist).

I’ve been contemplating this for a while, but with the current situation being fine most of the time for most of the people, it’s one of those cases where it’s hard to really justify the effort that goes into trying to change things.

More information about the Markdown-Discuss mailing list