1
0
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:
Jeremy Ruston 2012-06-02 10:15:41 +01:00
parent d30b63f752
commit 80b2d9c9fe

View File

@ -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)));
}