mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-01 01:26:43 +00:00
Added backtick notation for inline code blocks
Getting bored of typing {{{ and }}}, given that my keyboard already
devotes a key to backtick
This commit is contained in:
@@ -588,7 +588,7 @@ var rules = [
|
||||
|
||||
{
|
||||
name: "characterFormat",
|
||||
match: "''|//|__|\\^\\^|~~|--(?!\\s|$)|\\{\\{\\{",
|
||||
match: "''|//|__|\\^\\^|~~|--(?!\\s|$)|\\{\\{\\{|`",
|
||||
handler: function(w)
|
||||
{
|
||||
var e;
|
||||
@@ -623,6 +623,11 @@ var rules = [
|
||||
w.output.push(e);
|
||||
w.subWikifyTerm(e.children,/(--)/mg);
|
||||
break;
|
||||
case "`":
|
||||
e = {type: "code", children: []};
|
||||
w.output.push(e);
|
||||
w.subWikifyTerm(e.children,/(`)/mg);
|
||||
break;
|
||||
case "{{{":
|
||||
var lookaheadRegExp = /\{\{\{((?:.|\n)*?)\}\}\}/mg;
|
||||
lookaheadRegExp.lastIndex = w.matchStart;
|
||||
|
||||
Reference in New Issue
Block a user