mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-31 11:19:10 +00:00
Ensured terminator matches take precedence over rule matches
This commit is contained in:
parent
d30b63f752
commit
80b2d9c9fe
@ -88,7 +88,7 @@ WikiTextRenderer.prototype.parseRun = function(terminatorRegExp) {
|
||||
while(this.pos < this.sourceLength && (terminatorMatch || runRuleMatch)) {
|
||||
// Return if we've found the terminator, and it precedes any run rule match
|
||||
if(terminatorMatch) {
|
||||
if(!runRuleMatch || runRuleMatch.index > terminatorMatch.index) {
|
||||
if(!runRuleMatch || runRuleMatch.index >= terminatorMatch.index) {
|
||||
if(terminatorMatch.index > this.pos) {
|
||||
tree.push($tw.Tree.Text(this.source.substring(this.pos,terminatorMatch.index)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user