summaryrefslogtreecommitdiff
path: root/.config/nano/markdown.nanorc
blob: 448a396118edd0a35cc5450d577f21b86a82f9fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"

# Tables (Github extension)
color cyan ".*[ :]\|[ :].*"

# quotes
color brightblack  start="^>" end="^$"
color brightblack  "^>.*"

# Emphasis
color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"

# Strong emphasis
color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"

# strike-through
color red "(^|[[:space:]])~~[^ ][^~]*~~"

# horizontal rules
color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$"

# headlines
color brightmagenta  "^#{1,6}.*"

# lists
color blue   "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "

# leading whitespace
color black    "^[[:space:]]+"

# misc
color magenta   "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"

# links
color brightblue "\[[^]]+\]"
color brightblue "\[([^][]|\[[^]]*\])*\]\([^)]+\)"

# images
color magenta "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"

# urls
color brightyellow "https?://[^ )>]+"

# code
color yellow   "`[^`]*`|^ {4}[^-+*].*"
# code blocks
color yellow start="^```[^$]" end="^```$"
color yellow "^```$"

## Trailing spaces
color ,green "[[:space:]]+$"