diff --git a/lib/ace/mode/xml_highlight_rules.js b/lib/ace/mode/xml_highlight_rules.js index dd3d2a28..0968ea4a 100644 --- a/lib/ace/mode/xml_highlight_rules.js +++ b/lib/ace/mode/xml_highlight_rules.js @@ -49,7 +49,7 @@ var XmlHighlightRules = function(normalize) { }, {token : "comment", regex : "<\\!--", next : "comment"}, { - token : ["punctuation.doctype.begin", "meta.tag.doctype"], + token : ["punctuation.doctype.begin", "meta.doctype.tag"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" }, {include : "tag"}, diff --git a/lib/ace/mode/xml_util.js b/lib/ace/mode/xml_util.js index abae6075..edce54d5 100644 --- a/lib/ace/mode/xml_util.js +++ b/lib/ace/mode/xml_util.js @@ -60,13 +60,12 @@ exports.tag = function(states, name, nextState, tagMap) { regex : "\\s+" }, { //token : "meta.tag", - - token : !tagMap ? "meta.tag.tag-name" : function(value) { + token : tagMap ? function(value) { if (tagMap[value]) return "meta.tag.tag-name." + tagMap[value]; else return "meta.tag.tag-name"; - }, + } : "meta.tag.tag-name", regex : "[-_a-zA-Z0-9:]+", next : name + "_embed_attribute_list" }, {