Sublime Forum

Markdown Error with Lists

#1

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

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

Thanks,
Rick

0 Likes

#2

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:

punctuation.definition.list_item.markdown markup.list.unnumbered.markdown text.html.markdown 

But the rest of the list is entirely defined as:

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? :wink:

Alex

0 Likes