Merge pull request #699 from danyaPostfactum/master
xml entity support, doctype declaration is marked as "xml_re", not "meta.tag"
This commit is contained in:
commit
a675d6a0f7
3 changed files with 13 additions and 1 deletions
|
|
@ -62,6 +62,9 @@ var HtmlHighlightRules = function() {
|
|||
merge : true,
|
||||
regex : "<\\!--",
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "xml_pe",
|
||||
regex : "<\\!.*?>"
|
||||
}, {
|
||||
token : "meta.tag",
|
||||
regex : "<(?=\s*script\\b)",
|
||||
|
|
@ -77,6 +80,9 @@ var HtmlHighlightRules = function() {
|
|||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
token : "constant.character.entity",
|
||||
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "[^<]+"
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ var XmlHighlightRules = function() {
|
|||
merge : true,
|
||||
regex : "<\\!--",
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "xml_pe",
|
||||
regex : "<\\!.*?>"
|
||||
}, {
|
||||
token : "meta.tag", // opening tag
|
||||
regex : "<\\/?",
|
||||
|
|
@ -66,6 +69,9 @@ var XmlHighlightRules = function() {
|
|||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
token : "constant.character.entity",
|
||||
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "[^<]+"
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ exports.tag = function(states, name, nextState) {
|
|||
}
|
||||
},
|
||||
merge : true,
|
||||
regex : "[-_a-zA-Z0-9:!]+",
|
||||
regex : "[-_a-zA-Z0-9:]+",
|
||||
next : name + "_embed_attribute_list"
|
||||
}, {
|
||||
token: "empty",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue