]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/xml.yaml
Improve XML character entities highlighting and comment
[micro.git] / runtime / syntax / xml.yaml
1 filetype: xml
2
3 detect:
4     filename: "\\.(xml|sgml?|rng|svg|plist)$"
5     header: "<\\?xml.*\\?>"
6
7 rules:
8     - preproc:
9         start: "<!DOCTYPE"
10         end: "[/]?>"
11         rules: []
12     - comment: "<!--.+?-->"
13     # next line for highlighting of character entities doesn’t work as of now
14     - special: "&(#[[:digit:]]{1,4}|#x[[:xdigit:]]{1,4}|[^[[:space:]]]+);"
15     - symbol.tag:
16         start: "<\\??"
17         end: "\\??>"
18         rules:
19             - identifier:
20                 start: " "
21                 end: "="
22                 rules: []
23             - constant.string:
24                 start: "\""
25                 end: "\""
26                 skip: "\\\\."
27                 rules:
28                     - constant.specialChar: "\\\\."
29             - constant.string:
30                 start: "'"
31                 end: "'"
32                 skip: "\\\\."
33                 rules:
34                     - constant.specialChar: "\\\\."