mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-22 02:04:51 +00:00
Fixed parsing problem
We need to recheck for the next terminator after a successful run match to cope with the situation that the run match included the previously found terminator match
This commit is contained in:
@@ -168,9 +168,11 @@ WikiTextRenderer.prototype.parseRunTerminated = function(terminatorRegExp,option
|
||||
if(rule) {
|
||||
tree.push.apply(tree,rule.parse.call(this,runRuleMatch,false));
|
||||
}
|
||||
// Look for the next run rule
|
||||
// Look for the next run rule and the next terminator match
|
||||
this.parser.runRegExp.lastIndex = this.pos;
|
||||
runRuleMatch = this.parser.runRegExp.exec(this.source);
|
||||
terminatorRegExp.lastIndex = this.pos;
|
||||
terminatorMatch = terminatorRegExp.exec(this.source);
|
||||
}
|
||||
}
|
||||
// Process the remaining text
|
||||
|
||||
Reference in New Issue
Block a user