Ensured terminator matches take precedence over rule matches

print-window-tiddler
Jeremy Ruston 2012-06-02 10:15:41 +01:00
rodzic d30b63f752
commit 80b2d9c9fe
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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