fix(xml,dtd): adapt to parser changes

This commit is contained in:
ObserverOfTime 2024-10-22 08:34:05 +03:00 committed by Christian Clason
parent df20c04969
commit a5c7a3f6b4
3 changed files with 47 additions and 66 deletions

View file

@ -132,7 +132,7 @@
"revision": "ccd998f378c3f9345ea4eeb223f56d7b84d16687" "revision": "ccd998f378c3f9345ea4eeb223f56d7b84d16687"
}, },
"dtd": { "dtd": {
"revision": "809266ed1694d64dedc168a18893cc254e3edf7e" "revision": "cd1316e476ec40da6ce1fb5749c9d7e6b4f1090c"
}, },
"earthfile": { "earthfile": {
"revision": "1d637f2002bb8b22d4c08d26ad2bfbc22916f3ce" "revision": "1d637f2002bb8b22d4c08d26ad2bfbc22916f3ce"
@ -876,7 +876,7 @@
"revision": "fff3e72242aa110ebba6441946ea4d12d200fa68" "revision": "fff3e72242aa110ebba6441946ea4d12d200fa68"
}, },
"xml": { "xml": {
"revision": "809266ed1694d64dedc168a18893cc254e3edf7e" "revision": "cd1316e476ec40da6ce1fb5749c9d7e6b4f1090c"
}, },
"xresources": { "xresources": {
"revision": "630af80f563ede09a652a808277950c36306e3a3" "revision": "630af80f563ede09a652a808277950c36306e3a3"

View file

@ -1,17 +1,17 @@
; XML declaration ; Text declaration
(XMLDecl (TextDecl
"xml" @keyword.directive) "xml" @keyword.directive)
(XMLDecl (TextDecl
[ [
"version" "version"
"encoding" "encoding"
] @tag.attribute) ] @tag.attribute)
(XMLDecl (TextDecl
(EncName) @string.special) (EncName) @string.special)
(XMLDecl (TextDecl
(VersionNum) @number) (VersionNum) @number)
; Processing instructions ; Processing instructions
@ -65,12 +65,6 @@
"NOTATION" @keyword.directive "NOTATION" @keyword.directive
(Name) @label) (Name) @label)
(NotationDecl
(ExternalID
(SystemLiteral
(URI) @string.special.url))
(#set! priority 105))
; Attlist declaration ; Attlist declaration
(AttlistDecl (AttlistDecl
"ATTLIST" @keyword.directive.define "ATTLIST" @keyword.directive.define
@ -124,6 +118,7 @@
"?>" "?>"
"<!" "<!"
">" ">"
"<!["
"]]>" "]]>"
] @tag.delimiter ] @tag.delimiter

View file

@ -6,6 +6,7 @@
[ [
"version" "version"
"encoding" "encoding"
"standalone"
] @tag.attribute) ] @tag.attribute)
(XMLDecl (XMLDecl
@ -14,6 +15,12 @@
(XMLDecl (XMLDecl
(VersionNum) @number) (VersionNum) @number)
(XMLDecl
[
"yes"
"no"
] @boolean)
; Processing instructions ; Processing instructions
(PI) @keyword.directive (PI) @keyword.directive
@ -65,12 +72,6 @@
"NOTATION" @keyword.directive "NOTATION" @keyword.directive
(Name) @label) (Name) @label)
(NotationDecl
(ExternalID
(SystemLiteral
(URI) @string.special.url))
(#set! priority 105))
; Attlist declaration ; Attlist declaration
(AttlistDecl (AttlistDecl
"ATTLIST" @keyword.directive.define "ATTLIST" @keyword.directive.define
@ -118,45 +119,6 @@
(SystemLiteral (SystemLiteral
(URI) @string.special.url) (URI) @string.special.url)
; Delimiters & punctuation
[
"<?"
"?>"
"<!"
">"
"]]>"
] @tag.delimiter
[
"("
")"
"["
] @punctuation.bracket
[
"\""
"'"
] @punctuation.delimiter
[
","
"|"
"="
] @operator
; Misc
(Comment) @comment @spell
; XML declaration
(XMLDecl
"standalone" @tag.attribute)
(XMLDecl
[
"yes"
"no"
] @boolean)
; Processing instructions ; Processing instructions
(XmlModelPI (XmlModelPI
"xml-model" @keyword.directive) "xml-model" @keyword.directive)
@ -194,6 +156,36 @@
(Attribute (Attribute
(AttValue) @string) (AttValue) @string)
; Delimiters & punctuation
[
"<?"
"?>"
"<"
">"
"</"
"/>"
"<!"
"]]>"
] @tag.delimiter
[
"("
")"
"["
"]"
] @punctuation.bracket
[
"\""
"'"
] @punctuation.delimiter
[
","
"|"
"="
] @operator
; Text ; Text
(CharData) @none @spell (CharData) @none @spell
@ -203,11 +195,5 @@
"]]>" @module) "]]>" @module)
(#set! priority 105)) (#set! priority 105))
; Delimiters & punctuation ; Misc
[ (Comment) @comment @spell
"<"
"</"
"/>"
] @tag.delimiter
"]" @punctuation.bracket