Last active
December 15, 2015 15:19
-
-
Save mbixby/5280596 to your computer and use it in GitHub Desktop.
Quick fix for bullet coloring in Markdown.tmlanguage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dict> | |
<key>begin</key> | |
<!-- By default, maximum number of spaces before the bullet | |
character is 3. To support multiple nested lists, I changed | |
it to infinite. --> | |
<string>^[ ]*([*+-])(?=\s)</string> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.list_item.markdown</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>$</string> | |
<key>name</key> | |
<string>markup.list.unnumbered.markdown</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#list-line</string> | |
</dict> | |
</array> | |
</dict> | |
<!-- We changed #list-paragraph to #list-line. #inline styles are | |
included for each line separately, instead of spanning over | |
subsequent bullets in the list --> | |
<key>list-line</key> | |
<dict> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>begin</key> | |
<string>\G\s+(?=\S)</string> | |
<key>end</key> | |
<string>$</string> | |
<key>name</key> | |
<string>meta.paragraph.list.markdown</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#inline</string> | |
</dict> | |
</array> | |
</dict> | |
</array> | |
</dict> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment