Debian Codegraph @

runtime/syntax/markdown.yaml

raw
1 filetype: markdown
2
3 detect:
4 filename: "\\.(livemd|md|mkd|mkdn|markdown)$"
5
6 rules:
7 # Tables (Github extension)
8 - type: ".*[ :]\\|[ :].*"
9
10 # quotes
11 - statement: "^>.*"
12
13 # Emphasis
14 - type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"
15
16 # Strong emphasis
17 - type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"
18
19 # strike-through
20 - type: "(^|[[:space:]])~~[^ ][^~]*~~"
21
22 # horizontal rules
23 - special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$"
24
25 # headlines
26 - special: "^#{1,6}.*"
27
28 # lists
29 - identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. "
30
31 # misc
32 - preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))"
33
34 # links
35 - constant: "\\[[^]]+\\]"
36 - constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"
37
38 # images
39 - underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"
40
41 # urls
42 - underlined: "https?://[^ )>]+"
43
44 - special: "^```$"
45
46 - special:
47 start: "`"
48 end: "`"
49 rules: []