]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/asciidoc.yaml
Merge pull request #1412 from tommyshem/batSyntaxHighlighting
[micro.git] / runtime / syntax / asciidoc.yaml
index f78276dcabcc8fe7f766f29a3b62dab49c5e0ce0..fcf5f28761fe84e37da860751b907e6c001ef523 100644 (file)
@@ -1,24 +1,37 @@
 filetype: asciidoc
 
-detect: 
+detect:
     filename: "\\.(asc|asciidoc|adoc)$"
 
 rules:
+    # 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: "\\*[^\\*]+\\*"
@@ -27,7 +40,12 @@ rules:
     - constant.string: "\\^[^\\^]+\\^"
     - constant.string: "~[^~]+~"
     - constant.string: "'[^']+'"
+
     - constant: "`{1,2}[^']+'{1,2}"
+
+      # bullets
     - symbol: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]"
-    - bold default: "\\[\\[.*\\]\\]"
-    - bold default: "<<.*>>"
+
+      # anchors
+    - "bold default": "\\[\\[.*\\]\\]"
+    - "bold default": "<<.*>>"