micro/runtime/syntax/markdown.micro

45 lines
940 B
Text
Raw Normal View History

syntax "markdown" "\.(md|mkd|mkdn|markdown)$"
2016-03-21 16:16:02 +00:00
# Tables (Github extension)
color preproc ".*[ :]\|[ :].*"
2016-03-21 16:16:02 +00:00
# quotes
color constant.string "^>.*"
2016-03-21 16:16:02 +00:00
# Emphasis
color type "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
2016-03-21 16:16:02 +00:00
# Strong emphasis
color type.keyword "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
2016-03-21 16:16:02 +00:00
# strike-through
color type "(^|[[:space:]])~~[^ ][^~]*~~"
2016-03-21 16:16:02 +00:00
# horizontal rules
color symbol "^(---+|\+---+|===+|\+===+|___+|\*\*\*+|\+\*\*\*+)\s*$"
2016-03-21 16:16:02 +00:00
# headlines
color statement "^#{1,6}.*"
2016-03-21 16:16:02 +00:00
# lists
color identifier "^[[:space:]]*[\*+\-] |^[[:space:]]*[0-9]+\. "
2016-03-21 16:16:02 +00:00
# misc
color preproc "\b([CcRr]|[Tt][Mm])\b" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"
2016-03-21 16:16:02 +00:00
# links
color constant "\[[^]]+\]"
color constant "\[([^][]|\[[^]]*\])*\]\([^)]+\)"
2016-03-21 16:16:02 +00:00
# images
color underlined "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"
2016-03-21 16:16:02 +00:00
# urls
color underlined.url "https?://[^ )>]+"
2016-03-21 16:16:02 +00:00
# code
color special "`.*?`|^ {4}[^\-+*].*"
2016-03-21 16:16:02 +00:00
# code blocks
color symbol "^```$"