Skip to content

Instantly share code, notes, and snippets.

@mbixby
Last active December 15, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbixby/5280596 to your computer and use it in GitHub Desktop.
Save mbixby/5280596 to your computer and use it in GitHub Desktop.
Quick fix for bullet coloring in Markdown.tmlanguage
<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