]> git.lizzy.rs Git - micro.git/blob - syntax_files/markdown.micro
Proper window resize handling
[micro.git] / syntax_files / markdown.micro
1 syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"
2
3 # Tables (Github extension)
4 color cyan ".*[ :]\|[ :].*"
5
6 # quotes
7 color brightblack  "^>.*"
8
9 # Emphasis
10 color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
11
12 # Strong emphasis
13 color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
14
15 # strike-through
16 color red "(^|[[:space:]])~~[^ ][^~]*~~"
17
18 # horizontal rules
19 color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$"
20
21 # headlines
22 color brightmagenta  "^#{1,6}.*"
23
24 # lists
25 color blue   "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
26
27 # leading whitespace
28 color black    "^[[:space:]]+"
29
30 # misc
31 color magenta   "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"
32
33 # links
34 color brightblue "\[[^]]+\]"
35 color brightblue "\[([^][]|\[[^]]*\])*\]\([^)]+\)"
36
37 # images
38 color magenta "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"
39
40 # urls
41 color brightyellow "https?://[^ )>]+"
42
43 # code
44 color yellow   "`.*?`|^ {4}[^-+*].*"
45 # code blocks
46 # color yellow (s) "^```[^$].*?^```$"
47 color yellow "^```$"
48