mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fixed minor problem with backtick formatting
It's confusing if it behaves differently that the existing tripe-curly-brace format
This commit is contained in:
parent
a3d653e152
commit
c3c5334795
@ -624,9 +624,15 @@ var rules = [
|
||||
w.subWikifyTerm(e.children,/(--)/mg);
|
||||
break;
|
||||
case "`":
|
||||
e = {type: "code", children: []};
|
||||
w.output.push(e);
|
||||
w.subWikifyTerm(e.children,/(`)/mg);
|
||||
var lookaheadRegExp = /`((?:.|\n)*?)`/mg;
|
||||
lookaheadRegExp.lastIndex = w.matchStart;
|
||||
var lookaheadMatch = lookaheadRegExp.exec(w.source);
|
||||
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
|
||||
w.output.push({type: "code", children: [
|
||||
{type: "text", value: lookaheadMatch[1]}
|
||||
]});
|
||||
w.nextMatch = lookaheadRegExp.lastIndex;
|
||||
}
|
||||
break;
|
||||
case "{{{":
|
||||
var lookaheadRegExp = /\{\{\{((?:.|\n)*?)\}\}\}/mg;
|
||||
|
Loading…
Reference in New Issue
Block a user