]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/yaml.yaml
Add support for skipping and remove need for lookbehind
[micro.git] / runtime / syntax / yaml.yaml
index a2a529f5a902f0f73e224df934f3f97e4105cc89..63f28bf84a8f6e3c55ccbe256700f437812aebd5 100644 (file)
@@ -10,18 +10,19 @@ rules:
     - constant: "\\b(true|false)\\b"
     - statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )"
     - identifier: "[[:space:]][\\*&][A-Za-z0-9]+"
-    - type: "([-\\w]+:\\s+)|([-\\w]+:$)"
+    - type: "[-.\\w]+:"
+    - statement: ":"
     - special:  "(^---|^\\.\\.\\.|^%YAML|^%TAG)"
 
     - constant.string:
         start: "\""
-        end: "(?<!\\\\)\""
+        end: "\""
         rules:
             - constant.specialChar: "\\\\."
 
     - constant.string:
         start: "'"
-        end: "(?<!\\\\)'"
+        end: "'"
         rules:
             - constant.specialChar: "\\\\."