From 73ad243936c8c6e899cbb01555a4e92d9a9fdd41 Mon Sep 17 00:00:00 2001 From: Ryan Griffith Date: Wed, 24 Apr 2013 15:23:48 -0400 Subject: [PATCH] Addresses an issue where IE8 does not properly handle the RegExp in _parseTag, causing folding not to work for the XML mode (or modes that inherit XML). Tested XML mode in IE8/9 and major browsers. Should resolve ajaxorg/ace#1384 --- lib/ace/mode/folding/xml.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ace/mode/folding/xml.js b/lib/ace/mode/folding/xml.js index 3d3a3ab3..63842e93 100644 --- a/lib/ace/mode/folding/xml.js +++ b/lib/ace/mode/folding/xml.js @@ -80,9 +80,8 @@ oop.inherits(FoldMode, BaseFoldMode); this.tagRe = /^(\s*)(?)/; this._parseTag = function(tag) { - var match = this.tagRe.exec(tag); - var column = this.tagRe.lastIndex || 0; - this.tagRe.lastIndex = 0; + var match = tag.match(this.tagRe); + var column = 0; return { value: tag,