[TxMt] Re: a bug in the Markdown bundle

Allan Odgaard mailinglist at textmate.org
Sun Feb 16 02:42:48 UTC 2014


On 16 Feb 2014, at 2:21, Matt Neuburg wrote:

> Make a Markdown document like this […] The Markdown bundle marks 
> "Three" as markup.raw.block. This is wrong.

TextMate follows the specification from 
http://daringfireball.net/projects/markdown/syntax#list

This states “Each subsequent paragraph in a list item must be indented 
by either 4 spaces or one tab”.

If you run your document through babelmark you will see your document 
interpreted in five different ways:

     
http://johnmacfarlane.net/babelmark2/?normalize=1&text=*+One%0A++%0A++*+Two%0A++%0A++++++Three%0A

> […] Granted, nested lists in Markdown are annoying and incoherent

Indeed, though if you follow the specification quoted above, you should 
get consistent results accross markdown implementations. I actually 
consider it sort of a feature that TextMate’s highlight is a little 
fragile, as I’ve previously had cases where I did offline Markdown 
which looked fine, but later broke using e.g. PHP Markdown (online) or 
when I switched from Markdown.pl to multimarkdown (in these cases, 
because I didn’t consistently indent with four spaces / one tab).


More information about the textmate mailing list