1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

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

This commit is contained in:
Jeremy Ruston 2012-06-09 15:08:30 +01:00
parent 34311e230f
commit 9274651bfd

View File

@ -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) {