annotate nanorc.d/markdown.nanorc @ 84:b989099cde9f

Start to update Nano colourisation Defaults are REALLY basic
author IBBoard <dev@ibboard.co.uk>
date Sat, 31 Mar 2018 21:06:21 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
84
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 # Tables (Github extension)
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 color cyan ".*[ :]\|[ :].*"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 # quotes
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 color brightblack start="^>" end="^$"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 color brightblack "^>.*"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 # Emphasis
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 # Strong emphasis
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 # strike-through
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 color red "(^|[[:space:]])~~[^ ][^~]*~~"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 # horizontal rules
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 # headlines
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 color brightmagenta "^#{1,6}.*"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 # lists
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 color blue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 # leading whitespace
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 color black "^[[:space:]]+"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 # misc
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 # links
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 color brightblue "\[[^]]+\]"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 color brightblue "\[([^][]|\[[^]]*\])*\]\([^)]+\)"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 # images
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 color magenta "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 # urls
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 color brightyellow "https?://[^ )>]+"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 # code
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 color yellow "`[^`]*`|^ {4}[^-+*].*"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 # code blocks
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 color yellow start="^```[^$]" end="^```$"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 color yellow "^```$"
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 ## Trailing spaces
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 color ,green "[[:space:]]+$"