1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-18 21:22:52 +00:00

Use underscores for new system fields for global variable tiddlers

For consistency with `_canonical_uri`; unlike many system fields, the behaviour of these fields is baked into the core JS code.
This commit is contained in:
jeremy@jermolene.com 2022-05-30 18:38:25 +01:00
parent 3af2cc2691
commit 150266c731
4 changed files with 11 additions and 11 deletions

View File

@ -160,11 +160,11 @@ Widget.prototype.getVariableInfo = function(name,options) {
if(tiddler) { if(tiddler) {
return processVariable({ return processVariable({
value: tiddler.getFieldString("text"), value: tiddler.getFieldString("text"),
params: $tw.utils.parseParameterDefinition(tiddler.getFieldString("parameters"),{requireParenthesis: true}), params: $tw.utils.parseParameterDefinition(tiddler.getFieldString("_parameters"),{requireParenthesis: true}),
isMacroDefinition: tiddler.getFieldString("is-macro") === "yes", isMacroDefinition: tiddler.getFieldString("_is_macro") === "yes",
isWidgetDefinition: tiddler.getFieldString("is-widget") === "yes", isWidgetDefinition: tiddler.getFieldString("_is_widget") === "yes",
isProcedureDefinition: tiddler.getFieldString("is-procedure") === "yes", isProcedureDefinition: tiddler.getFieldString("_is_procedure") === "yes",
isFunctionDefinition: tiddler.getFieldString("is-function") === "yes" isFunctionDefinition: tiddler.getFieldString("_is_function") === "yes"
}); });
} }
} }

View File

@ -1,7 +1,7 @@
title: $:/global/tabs title: $:/global/tabs
code-body: yes code-body: yes
parameters: (tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain,actions,explicitState) _parameters: (tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain,actions,explicitState)
is-macro: yes _is_macro: yes
\?define tabs-button() \?define tabs-button()
\whitespace trim \whitespace trim

View File

@ -12,8 +12,8 @@ Sycamore!
</$$mywidget> </$$mywidget>
+ +
title: $:/global/$$mywidget title: $:/global/$$mywidget
is-widget: yes _is_widget: yes
parameters: (foo:"bar") _parameters: (foo:"bar")
Koala! <$text text=<<foo>>/>, <$slot $name="ts-body"/> Koala! <$text text=<<foo>>/>, <$slot $name="ts-body"/>
+ +

View File

@ -12,8 +12,8 @@ title: Output
<$text text=<<this-is-one 7>>/> <$text text=<<this-is-one 7>>/>
+ +
title: $:/global/this-is-one title: $:/global/this-is-one
is-function: yes _is_function: yes
parameters: (foo:"2") _parameters: (foo:"2")
[<foo>multiply[2.5]] [<foo>multiply[2.5]]
+ +