1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 23:03:15 +00:00

added a fix for issue #186

This commit is contained in:
Stephan Hradek 2013-12-25 14:31:35 +01:00
parent cfad04a5d0
commit 81106e500d

View File

@ -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),