mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-07-03 02:23:00 +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);
|
w.subWikifyTerm(e.children,/(--)/mg);
|
||||||
break;
|
break;
|
||||||
case "`":
|
case "`":
|
||||||
e = {type: "code", children: []};
|
var lookaheadRegExp = /`((?:.|\n)*?)`/mg;
|
||||||
w.output.push(e);
|
lookaheadRegExp.lastIndex = w.matchStart;
|
||||||
w.subWikifyTerm(e.children,/(`)/mg);
|
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;
|
break;
|
||||||
case "{{{":
|
case "{{{":
|
||||||
var lookaheadRegExp = /\{\{\{((?:.|\n)*?)\}\}\}/mg;
|
var lookaheadRegExp = /\{\{\{((?:.|\n)*?)\}\}\}/mg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user