align xml mode with html mode
This commit is contained in:
parent
64d8b93538
commit
9a612cd2e5
1 changed files with 27 additions and 5 deletions
|
|
@ -59,8 +59,9 @@ var XmlHighlightRules = function() {
|
||||||
regex : "<\\!--",
|
regex : "<\\!--",
|
||||||
next : "comment"
|
next : "comment"
|
||||||
}, {
|
}, {
|
||||||
token : "text", // opening tag
|
token : "meta.tag", // opening tag
|
||||||
regex : "<\\/?",
|
regex : "<\\/?",
|
||||||
|
merge : true,
|
||||||
next : "tag"
|
next : "tag"
|
||||||
}, {
|
}, {
|
||||||
token : "text",
|
token : "text",
|
||||||
|
|
@ -71,12 +72,33 @@ var XmlHighlightRules = function() {
|
||||||
}],
|
}],
|
||||||
|
|
||||||
tag : [{
|
tag : [{
|
||||||
token : "text",
|
token : "meta.tag",
|
||||||
|
merge : true,
|
||||||
|
regex : "\\s+"
|
||||||
|
}, {
|
||||||
|
token : "meta.tag",
|
||||||
|
regex : "[-_a-zA-Z0-9:]+",
|
||||||
|
merge : true,
|
||||||
|
next : "attribute-list"
|
||||||
|
}, {
|
||||||
|
token: "empty",
|
||||||
|
regex: "",
|
||||||
|
next : name + "attribute-list"
|
||||||
|
}],
|
||||||
|
|
||||||
|
"attribute-list": [{
|
||||||
|
token : "meta.tag",
|
||||||
regex : ">",
|
regex : ">",
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
token : "keyword",
|
token : "meta.tag",
|
||||||
|
regex : "="
|
||||||
|
}, {
|
||||||
|
token : "entity.other.attribute-name",
|
||||||
regex : "[-_a-zA-Z0-9:]+"
|
regex : "[-_a-zA-Z0-9:]+"
|
||||||
|
}, {
|
||||||
|
token : "constant.numeric", // float
|
||||||
|
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
||||||
}, {
|
}, {
|
||||||
token : "text",
|
token : "text",
|
||||||
regex : "\\s+"
|
regex : "\\s+"
|
||||||
|
|
@ -101,7 +123,7 @@ var XmlHighlightRules = function() {
|
||||||
qstring: [{
|
qstring: [{
|
||||||
token : "string",
|
token : "string",
|
||||||
regex : ".*?'",
|
regex : ".*?'",
|
||||||
next : "tag"
|
next : "attribute-list"
|
||||||
}, {
|
}, {
|
||||||
token : "string",
|
token : "string",
|
||||||
merge : true,
|
merge : true,
|
||||||
|
|
@ -111,7 +133,7 @@ var XmlHighlightRules = function() {
|
||||||
qqstring: [{
|
qqstring: [{
|
||||||
token : "string",
|
token : "string",
|
||||||
regex : ".*?\"",
|
regex : ".*?\"",
|
||||||
next : "tag"
|
next : "attribute-list"
|
||||||
}, {
|
}, {
|
||||||
token : "string",
|
token : "string",
|
||||||
merge : true,
|
merge : true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue