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:
Jeremy Ruston
2026-02-10 11:16:20 +00:00
committed by GitHub
parent 0177f09823
commit 64ee20edd2
22 changed files with 478 additions and 42 deletions

View File

@@ -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);
});
}