mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-03 13:26:54 +00:00
Further MVV fixes (#9645)
* Add ((var)) syntax for passing multi-valued variables through transclude pipeline
Introduce ((var)) attribute syntax to explicitly pass
MVVs to procedures and functions via $transclude, solving the limitation
where <<var>> always resolves to the first value only for backwards
compatibility. Also adds ((var||sep)) and (((filter||sep))) inline display
syntax for debugging MVV values, and multivalued defaults for parameter attributes
* Create pr-draft.md
* Revert "Create pr-draft.md"
This reverts commit dd116af41b.
* Update change note
* Fix linting errors
This commit is contained in:
@@ -61,7 +61,9 @@ ParametersWidget.prototype.execute = function() {
|
||||
if(name.substr(0,2) === "$$") {
|
||||
name = name.substr(1);
|
||||
}
|
||||
var value = pointer.getTransclusionParameter(name,index,self.getAttribute(attr.name,""));
|
||||
var defaultValue = (self.multiValuedAttributes && self.multiValuedAttributes[attr.name])
|
||||
|| self.getAttribute(attr.name,"");
|
||||
var value = pointer.getTransclusionParameter(name,index,defaultValue);
|
||||
self.setVariable(name,value);
|
||||
});
|
||||
// Assign any metaparameters
|
||||
@@ -80,7 +82,8 @@ ParametersWidget.prototype.execute = function() {
|
||||
if(name.substr(0,2) === "$$") {
|
||||
name = name.substr(1);
|
||||
}
|
||||
var value = self.getAttribute(attr.name,"");
|
||||
var value = (self.multiValuedAttributes && self.multiValuedAttributes[attr.name])
|
||||
|| self.getAttribute(attr.name,"");
|
||||
self.setVariable(name,value);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user