mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-05 16:37:20 -04:00
Many optimizations and new syntax files
This commit is contained in:
+45
-27
@@ -4,30 +4,48 @@ detect:
|
||||
filename: "\\.(asc|asciidoc|adoc)$"
|
||||
|
||||
rules:
|
||||
- red: "^====+$"
|
||||
- red: "^==[[:space:]].*$"
|
||||
- red: "^----+$"
|
||||
- magenta: "^===[[:space:]].*$"
|
||||
- magenta: "^~~~~+$"
|
||||
- green: "^====[[:space:]].*$"
|
||||
- green: "^\\^\\^\\^\\^+$"
|
||||
- brightblue: "^=====[[:space:]].*$"
|
||||
- brightblue: "^\\+\\+\\+\\++$"
|
||||
- brightgreen: ":.*:"
|
||||
- brightred: "\\{[a-z0-9]*\\}"
|
||||
- red: "\\\\\\{[a-z0-9]*\\}"
|
||||
- red: "\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+"
|
||||
- yellow: "^\\..*$"
|
||||
- magenta: "^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]"
|
||||
- yellow: ".*[[:space:]]\\+$"
|
||||
- yellow: "_[^_]+_"
|
||||
- yellow: "\\*[^\\*]+\\*"
|
||||
- yellow: "\\+[^\\+]+\\+"
|
||||
- yellow: "`[^`]+`"
|
||||
- yellow: "\\^[^\\^]+\\^"
|
||||
- yellow: "~[^~]+~"
|
||||
- yellow: "'[^']+'"
|
||||
- cyan: "`{1,2}[^']+'{1,2}"
|
||||
- brightmagenta: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]"
|
||||
- brightwhite: "\\[\\[.*\\]\\]"
|
||||
- brightwhite: "<<.*>>"
|
||||
# main header
|
||||
- preproc: "^====+$"
|
||||
# h1
|
||||
- statement: "^==[[:space:]].*$"
|
||||
- statement: "^----+$"
|
||||
# h2
|
||||
- symbol: "^===[[:space:]].*$"
|
||||
- symbol: "^~~~~+$"
|
||||
# h4
|
||||
- type: "^====[[:space:]].*$"
|
||||
- type: "^\\^\\^\\^\\^+$"
|
||||
# h5
|
||||
- constant: "^=====[[:space:]].*$"
|
||||
- constant: "^\\+\\+\\+\\++$"
|
||||
|
||||
# attributes
|
||||
- type.keyword: ":.*:"
|
||||
- identifier.macro: "\\{[a-z0-9]*\\}"
|
||||
- identifier: "\\\\\\{[a-z0-9]*\\}"
|
||||
- identifier: "\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+"
|
||||
|
||||
# Paragraph Title
|
||||
- statement: "^\\..*$"
|
||||
|
||||
# source
|
||||
- identifier: "^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]"
|
||||
|
||||
# Other markup
|
||||
- constant.string: ".*[[:space:]]\\+$"
|
||||
- constant.string: "_[^_]+_"
|
||||
- constant.string: "\\*[^\\*]+\\*"
|
||||
- constant.string: "\\+[^\\+]+\\+"
|
||||
- constant.string: "`[^`]+`"
|
||||
- constant.string: "\\^[^\\^]+\\^"
|
||||
- constant.string: "~[^~]+~"
|
||||
- constant.string: "'[^']+'"
|
||||
|
||||
- constant: "`{1,2}[^']+'{1,2}"
|
||||
|
||||
# bullets
|
||||
- symbol: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]"
|
||||
|
||||
# anchors
|
||||
- "bold default": "\\[\\[.*\\]\\]"
|
||||
- "bold default": "<<.*>>"
|
||||
|
||||
Reference in New Issue
Block a user