mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-05-09 19:04:09 +00:00
Cleaning up some macro definition wrinkles
This commit is contained in:
parent
306f305a25
commit
d89ea0abd7
@ -381,14 +381,15 @@ WikiStore.prototype.installMacros = function() {
|
|||||||
params: {
|
params: {
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
"text/html": this.jsParser.parse("return '5.0.0';"),
|
"text/html": this.jsParser.parse("return utils.htmlEncode('5.0.0');"),
|
||||||
"text/plain": this.jsParser.parse("return '5.0.0';")
|
"text/plain": this.jsParser.parse("return '5.0.0';")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tiddler: {
|
tiddler: {
|
||||||
|
cascadeParams: true, // Cascade names of named parameters to following anonymous parameters
|
||||||
params: {
|
params: {
|
||||||
target: {byName: "default", type: "tiddler", optional: false},
|
target: {byName: "default", type: "tiddler", optional: false},
|
||||||
"with": {byName: true, type: "text", optional: true, cascade: true}
|
"with": {byName: true, type: "text", optional: true}
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
"text/html": this.jsParser.parse("return store.renderTiddler('text/html',params.target);"),
|
"text/html": this.jsParser.parse("return store.renderTiddler('text/html',params.target);"),
|
||||||
@ -397,10 +398,9 @@ WikiStore.prototype.installMacros = function() {
|
|||||||
},
|
},
|
||||||
info: {
|
info: {
|
||||||
params: {
|
params: {
|
||||||
|
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
"text/html": this.jsParser.parse("return store.tiddlerInfo(tiddler.fields.title);"),
|
"text/html": this.jsParser.parse("return utils.htmlEncode(store.tiddlerInfo(tiddler.fields.title));"),
|
||||||
"text/plain": this.jsParser.parse("return store.tiddlerInfo(tiddler.fields.title);")
|
"text/plain": this.jsParser.parse("return store.tiddlerInfo(tiddler.fields.title);")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user