From 81106e500d042a09824cd3e7f9f35ebd244d2741 Mon Sep 17 00:00:00 2001 From: Stephan Hradek Date: Wed, 25 Dec 2013 14:31:35 +0100 Subject: [PATCH] added a fix for issue #186 --- core/modules/parsers/wikiparser/rules/codeinline.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/codeinline.js b/core/modules/parsers/wikiparser/rules/codeinline.js index 84777edd9..ee9149833 100644 --- a/core/modules/parsers/wikiparser/rules/codeinline.js +++ b/core/modules/parsers/wikiparser/rules/codeinline.js @@ -7,6 +7,7 @@ Wiki text inline rule for code runs. For example: ``` This is a `code run`. + This is another ``code run`` ``` \*/ @@ -22,13 +23,13 @@ exports.types = {inline: true}; exports.init = function(parser) { this.parser = parser; // Regexp to match - this.matchRegExp = /`/mg; + this.matchRegExp = /(``?)/mg; }; exports.parse = function() { // Move past the match this.parser.pos = this.matchRegExp.lastIndex; - var reEnd = /`/mg; + var reEnd = new RegExp(this.match[1], "mg"); // Look for the end marker reEnd.lastIndex = this.parser.pos; var match = reEnd.exec(this.parser.source),