mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +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:
parent
14e252590c
commit
d01ba66305
@ -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;
|
||||
|
@ -27,13 +27,13 @@ Tiddlers are a dictionary of name:value pairs called fields.
|
||||
|
||||
The only field that is required is the {{{title}}} field, but useful tiddlers also have a {{{text}}} field, and some or all of the standard fields {{{modified}}}, {{{modifier}}}, {{{created}}}, {{{creator}}}, {{{tags}}} and {{{type}}}.
|
||||
|
||||
Values can be a string, an array of strings, or a JavaScript {{{Date}}} object. Hardcoded in the system is the knowledge that the 'tags' field is a string array, and that the 'modified' and 'created' fields are dates. All other fields are strings.
|
||||
Values can be a string, an array of strings, or a JavaScript {{{Date}}} object. Hardcoded in the system is the knowledge that the `tags` field is a string array, and that the `modified` and `created` fields are dates. All other fields are strings.
|
||||
|
||||
The {{{type}}} field identifies the representation of the tiddler text with a raw, unparameterised, MIME type.
|
||||
|
||||
!! WikiStore
|
||||
|
||||
Groups of uniquely title tiddlers are contained in WikiStore objects.
|
||||
Groups of uniquely titled tiddlers are contained in WikiStore objects.
|
||||
|
||||
The WikiStore also manages the plugin modules used for macros, and operations like serializing, deserializing, parsing and rendering tiddlers.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user