mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 17:10:29 +00:00
added a fix for issue #186
This commit is contained in:
parent
cfad04a5d0
commit
81106e500d
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user