1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +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:
Jeremy Ruston 2012-01-15 11:41:54 +00:00
parent a3d653e152
commit c3c5334795

View File

@ -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;