micro/runtime/syntax/xml.yaml
Jöran Karl 433879046e Improve file detection with signature check capabilities
This allows more complex detection upon regex rules for a certain amount of
lines.
2023-10-26 20:20:02 +02:00

38 lines
824 B
YAML

filetype: xml
detect:
filename: "\\.(xml|sgml?|rng|svg|plist)$"
signature: "<\\?xml.*\\?>"
rules:
- preproc:
start: "<!DOCTYPE"
end: "[/]?>"
rules: []
- comment:
start: "<!--"
end: "-->"
rules: []
- 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: "\\\\."