So maybe my last email (pasted below) was poorly worded. I'll try again...
I've found 3 highlighting bugs and 2 export bugs in the Markdown bundle. I'd fix them myself but the Markdown Bundle's kung-fu is too much for me to handle.
Highlighting Bugs -----------------
1. Raw code nested inside blockquotes require indentation by two tabs, not one. 2. Same rule applies to lists. 3. Reference-style links should allow titles to be listed on the next line, indented with as many tabs as you'd like.
All three of these are *just* highlighting bugs, they export to HTML just fine.
Export to HTML bugs -------------------
1. Raw code nested inside blockquotes is incorrectly exported with two leading spaces inside the pre/code tags. 2. According to Markdown syntax, reference-style link's titles are allowed to be inside single-quotes.
And that's it. If you need an example to paste into TextMate see here: http://pastie.textmate.org/private/tetzlcuww7rmb8jkcff4ia
--oliver
------------------------------------------------------------
On Fri Dec 5 at 20:55:31 Oliver Taylor wrote:
I was playing with Markdown (yeah I'm that kind of nerd) and I ran into the following bugs:
This message is also on pastie in case the list strips tabs: http://pastie.textmate.org/private/tetzlcuww7rmb8jkcff4ia
This text is indented from the bracket ">" by one tab (which is allowed in Markdown) and is mis-highlighted by TextMate as a nested code block. If, however, I indent by 4 spaces TextMate highlights this correctly.
When blockquote-nested code blocks, like this paragraph, are
processed into HTML they include two spaces at the beginning of the code block.
- Code blocks in lists must also be indented by 2 tabs.
This should be highlighted as code.
Processing this to HTML works as expected, and does not include the blockquote's "2 space" bug.
[Links](http://example.com) can be [written][foo] a number of [different ways][bar].
"This line begins with 2 tabs. It is highlighted as code, but processes as a title (as it should)"
[bar]: http://example.com 'single quoted titles don't highlight or process, but should be allowed according to the Markdown syntax'
Is there a specific reason single-quote titles aren't allowed?
Also, shouldn't links like this http://example.com be scoped as `string.other.link.markdown` or something so that they highlight like every other kind of link?
Thanks for indulging me.
--oliver
On 2008-Dec-10, at 2:02 AM, Oliver Taylor wrote:
Export to HTML bugs
Are you sure these bugs are in the Markdown bundle? I believe all it does is pipe the text through Markdown.pl. So, theoretically, if you saved the file and piped it yourself on the command-line, you would see the exact same result (with no TextMate involved). Am I missing something?
On Wed, Dec 10, 2008 at 11:31 AM, Rob McBroom textmate@skurfer.com wrote:
On 2008-Dec-10, at 2:02 AM, Oliver Taylor wrote:
Export to HTML bugs
Are you sure these bugs are in the Markdown bundle? I believe all it does is pipe the text through Markdown.pl. So, theoretically, if you saved the file and piped it yourself on the command-line, you would see the exact same result (with no TextMate involved). Am I missing something?
You are absolutely correct. The bugs are Markdown's. I'll send an email to Mr. Gruber.
But the highlighting bugs remain TextMate's.
On 10 Dec 2008, at 21:16, Oliver Taylor wrote:
[...] But the highlighting bugs remain TextMate's.
Markdown is a perl script which does a series of global regexp replacements on your document, some of them work by temporarily replacing subsets with md5s, to avoid having the following replacements touch the subcontent, etc.
It is not possible to capture this in a grammar modeled after a recursive descent parser. I do however expect nested block-level constructs to be handled (nicely) after 2.0 (where a new rule type will be introduced), but it will diverge from the Markdown “spec” because we can’t really work with that, for more info see: http://six.pairlist.net/pipermail/markdown-discuss/2008-March/001072.html