Home Download Buy Blog Forum Support

Markdown Error with Lists

Markdown Error with Lists

Postby rickhutcheson on Sat Mar 10, 2012 6:03 am

Hi all, first posting, just bought ST2. :)

I'm having an issue with the markdown .tmLanguage file. It seems to only match the first layer of lists when recognizing when punctuation is "list" punctuation. I ran into this when trying to write a new color scheme for markdown.

* I'm matched! My astersk is colored!
    * My asterisk is not!

Just wondering if someone knew a fix for the issue, as I couldn't puzzle out the intricacies of the .tmLanguage file .

Note: If you need a .tmTheme file to test the issue with, you can use the one I'm working on: http://github.com/rickhutcheson/Stormy

Posts: 1
Joined: Sat Mar 10, 2012 5:57 am

Re: Markdown Error with Lists

Postby quodlibet on Wed Mar 14, 2012 3:08 pm

Hi Rick,

As you indicate, the issue is with the .tmLanguage file not your theme.

In the example you give, the first bullet is defined as:
Code: Select all
punctuation.definition.list_item.markdown markup.list.unnumbered.markdown text.html.markdown

But the rest of the list is entirely defined as:
Code: Select all
meta.paragraph.list.markdown markup.list.unnumbered.markdown text.html.markdown

( You can use the following plugin to identify the scopes in your files: viewtopic.php?f=3&t=1646&p=7545&hilit=scope+clipboard#p7545 )

That's why you can color the first bullet, but not the others.

The situation at present is that Markdown.tmLanguage stinks. Unfortunately I don't have sufficient regexp-fu to improve the syntax file --- to say nothing of properly supporting more sophisticated syntaxes, like Pandoc.

Any volunteers? ;)

Posts: 508
Joined: Sat Jun 18, 2011 5:53 pm

Return to Technical Support

Who is online

Users browsing this forum: Majestic-12 [Bot], Yahoo [Bot] and 20 guests