mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-01 22:38:08 +00:00
* Fix for #3306, inline/block widget glitch * Just realized we don't need to set lastIndex anymore * Forgot that parseBlocks doesn't use options
This commit is contained in:
@@ -53,17 +53,12 @@ exports.parse = function() {
|
||||
tag.isBlock = this.is.block || hasLineBreak;
|
||||
// Parse the body if we need to
|
||||
if(!tag.isSelfClosing && $tw.config.htmlVoidElements.indexOf(tag.tag) === -1) {
|
||||
var reEndString = "</" + $tw.utils.escapeRegExp(tag.tag) + ">",
|
||||
reEnd = new RegExp("(" + reEndString + ")","mg");
|
||||
var reEndString = "</" + $tw.utils.escapeRegExp(tag.tag) + ">";
|
||||
if(hasLineBreak) {
|
||||
tag.children = this.parser.parseBlocks(reEndString);
|
||||
} else {
|
||||
tag.children = this.parser.parseInlineRun(reEnd);
|
||||
}
|
||||
reEnd.lastIndex = this.parser.pos;
|
||||
var endMatch = reEnd.exec(this.parser.source);
|
||||
if(endMatch && endMatch.index === this.parser.pos) {
|
||||
this.parser.pos = endMatch.index + endMatch[0].length;
|
||||
var reEnd = new RegExp("(" + reEndString + ")","mg");
|
||||
tag.children = this.parser.parseInlineRun(reEnd,{eatTerminator: true});
|
||||
}
|
||||
}
|
||||
// Return the tag
|
||||
|
||||
Reference in New Issue
Block a user