Debian Codegraph @

runtime/syntax/asciidoc.yaml

raw
1 filetype: asciidoc
2
3 detect:
4 filename: "\\.(asc|asciidoc|adoc)$"
5
6 rules:
7 # main header
8 - preproc: "^====+$"
9 # h1
10 - statement: "^==[[:space:]].*$"
11 - statement: "^----+$"
12 # h2
13 - symbol: "^===[[:space:]].*$"
14 - symbol: "^~~~~+$"
15 # h4
16 - type: "^====[[:space:]].*$"
17 - type: "^\\^\\^\\^\\^+$"
18 # h5
19 - constant: "^=====[[:space:]].*$"
20 - constant: "^\\+\\+\\+\\++$"
21
22 # attributes
23 - type.keyword: ":.*:"
24 - identifier.macro: "\\{[a-z0-9]*\\}"
25 - identifier: "\\\\\\{[a-z0-9]*\\}"
26 - identifier: "\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+"
27
28 # Paragraph Title
29 - statement: "^\\..*$"
30
31 # source
32 - identifier: "^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]"
33
34 # Other markup
35 - constant.string: ".*[[:space:]]\\+$"
36 - constant.string: "_[^_]+_"
37 - constant.string: "\\*[^\\*]+\\*"
38 - constant.string: "\\+[^\\+]+\\+"
39 - constant.string: "`[^`]+`"
40 - constant.string: "\\^[^\\^]+\\^"
41 - constant.string: "~[^~]+~"
42 - constant.string: "'[^']+'"
43
44 - constant: "`{1,2}[^']+'{1,2}"
45
46 # bullets
47 - symbol: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]"
48
49 # anchors
50 - "bold default": "\\[\\[.*\\]\\]"
51 - "bold default": "<<.*>>"