]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/markdown.micro
Merge branch 'elementary-mouse'
[micro.git] / runtime / syntax / markdown.micro
1 syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"
2
3 # Tables (Github extension)
4 color type ".*[ :]\|[ :].*"
5
6 # quotes
7 color statement  "^>.*"
8
9 # Emphasis
10 color type "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
11
12 # Strong emphasis
13 color type "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
14
15 # strike-through
16 color type "(^|[[:space:]])~~[^ ][^~]*~~"
17
18 # horizontal rules
19 color special "^(---+|===+|___+|\*\*\*+)\s*$"
20
21 # headlines
22 color special  "^#{1,6}.*"
23
24 # lists
25 color identifier   "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
26
27 # misc
28 color preproc   "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"
29
30 # links
31 color constant "\[[^]]+\]"
32 color constant "\[([^][]|\[[^]]*\])*\]\([^)]+\)"
33
34 # images
35 color underlined "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"
36
37 # urls
38 color underlined "https?://[^ )>]+"
39
40 # code
41 color special   "`.*?`|^ {4}[^-+*].*"
42 # code blocks
43 color special "^```$"
44