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,