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:
Jeremy Ruston
2012-01-08 11:33:24 +00:00
parent 14e252590c
commit d01ba66305
2 changed files with 8 additions and 3 deletions

View File

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