]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/xml.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / xml.yaml
index dbc995120a7d0a327c7a9f6d6f3350e07a4f237e..df4cde8118f7b44c1e2459cade1dddaef55547c0 100644 (file)
@@ -1,16 +1,37 @@
 filetype: xml
 
 detect:
-    filename: "\\.(xml|sgml?|rng|plist)$"
+    filename: "\\.(xml|sgml?|rng|svg|plist)$"
+    header: "<\\?xml.*\\?>"
 
 rules:
-    - identifier: "<.*?>"
-    - comment:
+    - preproc:
         start: "<!DOCTYPE"
         end: "[/]?>"
         rules: []
-    - comment: 
+
+    - comment:
         start: "<!--"
         end: "-->"
         rules: []
-    - special: "&[^;]*;"
+
+    - symbol.tag:
+        start: "<\\??"
+        end: "\\??>"
+        rules:
+            - identifier:
+                start: " "
+                end: "="
+                rules: []
+            - constant.string:
+                start: "\""
+                end: "\""
+                skip: "\\\\."
+                rules:
+                    - constant.specialChar: "\\\\."
+            - constant.string:
+                start: "'"
+                end: "'"
+                skip: "\\\\."
+                rules:
+                    - constant.specialChar: "\\\\."