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:
parent
3af2cc2691
commit
150266c731
@ -160,11 +160,11 @@ Widget.prototype.getVariableInfo = function(name,options) {
|
||||
if(tiddler) {
|
||||
return processVariable({
|
||||
value: tiddler.getFieldString("text"),
|
||||
params: $tw.utils.parseParameterDefinition(tiddler.getFieldString("parameters"),{requireParenthesis: true}),
|
||||
isMacroDefinition: tiddler.getFieldString("is-macro") === "yes",
|
||||
isWidgetDefinition: tiddler.getFieldString("is-widget") === "yes",
|
||||
isProcedureDefinition: tiddler.getFieldString("is-procedure") === "yes",
|
||||
isFunctionDefinition: tiddler.getFieldString("is-function") === "yes"
|
||||
params: $tw.utils.parseParameterDefinition(tiddler.getFieldString("_parameters"),{requireParenthesis: true}),
|
||||
isMacroDefinition: tiddler.getFieldString("_is_macro") === "yes",
|
||||
isWidgetDefinition: tiddler.getFieldString("_is_widget") === "yes",
|
||||
isProcedureDefinition: tiddler.getFieldString("_is_procedure") === "yes",
|
||||
isFunctionDefinition: tiddler.getFieldString("_is_function") === "yes"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/global/tabs
|
||||
code-body: yes
|
||||
parameters: (tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain,actions,explicitState)
|
||||
is-macro: yes
|
||||
_parameters: (tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain,actions,explicitState)
|
||||
_is_macro: yes
|
||||
|
||||
\?define tabs-button()
|
||||
\whitespace trim
|
||||
|
@ -12,8 +12,8 @@ Sycamore!
|
||||
</$$mywidget>
|
||||
+
|
||||
title: $:/global/$$mywidget
|
||||
is-widget: yes
|
||||
parameters: (foo:"bar")
|
||||
_is_widget: yes
|
||||
_parameters: (foo:"bar")
|
||||
|
||||
Koala! <$text text=<<foo>>/>, <$slot $name="ts-body"/>
|
||||
+
|
||||
|
@ -12,8 +12,8 @@ title: Output
|
||||
<$text text=<<this-is-one 7>>/>
|
||||
+
|
||||
title: $:/global/this-is-one
|
||||
is-function: yes
|
||||
parameters: (foo:"2")
|
||||
_is_function: yes
|
||||
_parameters: (foo:"2")
|
||||
|
||||
[<foo>multiply[2.5]]
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user