diff --git a/core/modules/parsers/newwikitextparser/newwikitextparser.js b/core/modules/parsers/newwikitextparser/newwikitextparser.js index ed9837c86..74ad1aa45 100644 --- a/core/modules/parsers/newwikitextparser/newwikitextparser.js +++ b/core/modules/parsers/newwikitextparser/newwikitextparser.js @@ -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 diff --git a/tw5.com/tiddlers/TestingNewWikiText.tid b/tw5.com/tiddlers/TestingNewWikiText.tid index a9558257d..362ffee0f 100644 --- a/tw5.com/tiddlers/TestingNewWikiText.tid +++ b/tw5.com/tiddlers/TestingNewWikiText.tid @@ -27,6 +27,8 @@ Here is a macro <>. This is a macro with content <> +This is another macro with content, this time including another macro: <> of TiddlyWiki.>>. That's that. + ! This is a new heading This is a paragraph immediately after