Fix HTML element parser to not pass capturing parenthesis in terminating regexp

print-window-tiddler
Jeremy Ruston 2013-04-04 14:24:21 +01:00
rodzic 02e0b1059e
commit 4bcebf5bbf
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -70,8 +70,8 @@ exports.parse = function() {
}
// Process the end tag
if(!isSelfClosing && $tw.config.htmlVoidElements.indexOf(tagName) === -1) {
var reEndString = "(</" + $tw.utils.escapeRegExp(tagName) + ">)",
reEnd = new RegExp(reEndString,"mg"),
var reEndString = "</" + $tw.utils.escapeRegExp(tagName) + ">",
reEnd = new RegExp("(" + reEndString + ")","mg"),
content;
if(hasLineBreak) {
content = this.parser.parseBlocks(reEndString);