From 528e760dcd00baad6aecc239616c4dd5dfd74b1d Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 2 Sep 2013 03:14:17 +0400 Subject: [PATCH] do not add fold widget for doctype --- lib/ace/mode/xml_highlight_rules.js | 2 +- lib/ace/mode/xml_util.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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" }, {