Parse HTML tag contents as a block if it is a block tag

print-window-tiddler
Jeremy Ruston 2012-06-09 15:08:30 +01:00
rodzic 34311e230f
commit 9274651bfd
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -50,7 +50,13 @@ exports.parse = function(match,isBlock) {
}
this.pos = startMatch.index + startMatch[0].length;
var reEnd = new RegExp("(</" + startMatch[1] + ">)","mg"),
element = $tw.Tree.Element(startMatch[1],attributes,this.parseRun(reEnd));
content;
if(isBlock) {
content = this.parseBlockTerminated(reEnd);
} else {
content = this.parseRun(reEnd);
}
var element = $tw.Tree.Element(startMatch[1],attributes,content);
reEnd.lastIndex = this.pos;
match = reEnd.exec(this.source);
if(match && match.index === this.pos) {