mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 01:20:30 +00:00
Parse HTML tag contents as a block if it is a block tag
This commit is contained in:
parent
34311e230f
commit
9274651bfd
@ -50,7 +50,13 @@ exports.parse = function(match,isBlock) {
|
|||||||
}
|
}
|
||||||
this.pos = startMatch.index + startMatch[0].length;
|
this.pos = startMatch.index + startMatch[0].length;
|
||||||
var reEnd = new RegExp("(</" + startMatch[1] + ">)","mg"),
|
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;
|
reEnd.lastIndex = this.pos;
|
||||||
match = reEnd.exec(this.source);
|
match = reEnd.exec(this.source);
|
||||||
if(match && match.index === this.pos) {
|
if(match && match.index === this.pos) {
|
||||||
|
Loading…
Reference in New Issue
Block a user