1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-24 10:37:20 +00:00

Replace ubertransclude widget with transclude widget

This commit is contained in:
jeremy@jermolene.com 2022-04-30 10:00:38 +01:00
parent aac2d6ccb0
commit 886c8620f5
21 changed files with 106 additions and 314 deletions

View File

@ -21,7 +21,7 @@ var BinaryParser = function(type,text,options) {
type: "element", type: "element",
tag: "p", tag: "p",
children: [{ children: [{
type: "ubertransclude", type: "transclude",
attributes: { attributes: {
"$tiddler": {type: "string", value: BINARY_WARNING_MESSAGE} "$tiddler": {type: "string", value: BINARY_WARNING_MESSAGE}
} }
@ -36,7 +36,7 @@ var BinaryParser = function(type,text,options) {
download: {type: "indirect", textReference: "!!title"} download: {type: "indirect", textReference: "!!title"}
}, },
children: [{ children: [{
type: "ubertransclude", type: "transclude",
attributes: { attributes: {
"$tiddler": {type: "string", value: EXPORT_BUTTON_IMAGE} "$tiddler": {type: "string", value: EXPORT_BUTTON_IMAGE}
} }

View File

@ -35,7 +35,7 @@ exports.parse = function() {
params = this.match[3] ? this.match[3].split("|") : []; params = this.match[3] ? this.match[3].split("|") : [];
// Prepare the transclude widget // Prepare the transclude widget
var transcludeNode = { var transcludeNode = {
type: "ubertransclude", type: "transclude",
attributes: {}, attributes: {},
isBlock: true isBlock: true
}; };

View File

@ -35,7 +35,7 @@ exports.parse = function() {
params = this.match[3] ? this.match[3].split("|") : []; params = this.match[3] ? this.match[3].split("|") : [];
// Prepare the transclude widget // Prepare the transclude widget
var transcludeNode = { var transcludeNode = {
type: "ubertransclude", type: "transclude",
attributes: {} attributes: {}
}; };
$tw.utils.each(params,function(paramValue,index) { $tw.utils.each(params,function(paramValue,index) {

View File

@ -13,7 +13,7 @@ Widget for definition of transclusion parameters
"use strict"; "use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget, var Widget = require("$:/core/modules/widgets/widget.js").widget,
UberTranscludeWidget = require("$:/core/modules/widgets/ubertransclude.js").ubertransclude; TranscludeWidget = require("$:/core/modules/widgets/transclude.js").transclude;
var ParametersWidget = function(parseTreeNode,options) { var ParametersWidget = function(parseTreeNode,options) {
// Initialise // Initialise
@ -44,7 +44,7 @@ ParametersWidget.prototype.execute = function() {
var self = this; var self = this;
// Find the parent transclusion // Find the parent transclusion
var transclusionWidget = this.parentWidget; var transclusionWidget = this.parentWidget;
while(transclusionWidget && !(transclusionWidget instanceof UberTranscludeWidget)) { while(transclusionWidget && !(transclusionWidget instanceof TranscludeWidget)) {
transclusionWidget = transclusionWidget.parentWidget; transclusionWidget = transclusionWidget.parentWidget;
} }
// Process each parameter // Process each parameter

View File

@ -13,7 +13,7 @@ Widget for definition of slots within transcluded content. The values provided b
"use strict"; "use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget, var Widget = require("$:/core/modules/widgets/widget.js").widget,
UberTranscludeWidget = require("$:/core/modules/widgets/ubertransclude.js").ubertransclude; TranscludeWidget = require("$:/core/modules/widgets/transclude.js").transclude;
var SlotWidget = function(parseTreeNode,options) { var SlotWidget = function(parseTreeNode,options) {
// Initialise // Initialise
@ -45,7 +45,7 @@ SlotWidget.prototype.execute = function() {
this.slotName = this.getAttribute("$name"); this.slotName = this.getAttribute("$name");
// Find the parent transclusion // Find the parent transclusion
var transclusionWidget = this.parentWidget; var transclusionWidget = this.parentWidget;
while(transclusionWidget && !(transclusionWidget instanceof UberTranscludeWidget)) { while(transclusionWidget && !(transclusionWidget instanceof TranscludeWidget)) {
transclusionWidget = transclusionWidget.parentWidget; transclusionWidget = transclusionWidget.parentWidget;
} }
// Get the parse tree nodes comprising the slot contents // Get the parse tree nodes comprising the slot contents

View File

@ -1,208 +0,0 @@
/*\
title: $:/core/modules/widgets/ubertransclude.js
type: application/javascript
module-type: widget
Ubertransclude widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var UberTranscludeWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
UberTranscludeWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
UberTranscludeWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
};
/*
Compute the internal state of the widget
*/
UberTranscludeWidget.prototype.execute = function() {
var self = this;
// Get our parameters
this.transcludeVariable = this.getAttribute("$variable");
this.transcludeType = this.getAttribute("$type");
this.transcludeTitle = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
this.transcludeSubTiddler = this.getAttribute("$subtiddler");
this.transcludeField = this.getAttribute("$field");
this.transcludeIndex = this.getAttribute("$index");
this.transcludeMode = this.getAttribute("$mode");
this.recursionMarker = this.getAttribute("$recursionMarker","yes");
// Collect the string parameters
this.stringParametersByName = Object.create(null);
$tw.utils.each(this.attributes,function(value,name) {
if(name.charAt(0) === "$") {
if(name.charAt(1) === "$") {
// Attributes starting $$ represent parameters starting with a single $
name = name.slice(1);
} else {
// Attributes starting with a single $ are reserved for the widget
return;
}
}
self.stringParametersByName[name] = value;
});
// Collect the value widgets in our child parse tree
this.slotValueParseTrees = Object.create(null);
var noValueWidgetsFound = true,
searchParseTreeNodes = function(nodes) {
$tw.utils.each(nodes,function(node) {
if(node.type === "value" && node.tag === "$value") {
if(node.attributes["$name"] && node.attributes["$name"].type === "string") {
var slotValueName = node.attributes["$name"].value;
self.slotValueParseTrees[slotValueName] = node.children;
}
noValueWidgetsFound = false;
} else {
searchParseTreeNodes(node.children);
}
});
};
searchParseTreeNodes(this.parseTreeNode.children);
if(noValueWidgetsFound) {
this.slotValueParseTrees["ts-missing"] = this.parseTreeNode.children;
}
// Parse the text reference
var parseAsInline = !this.parseTreeNode.isBlock;
if(this.transcludeMode === "inline") {
parseAsInline = true;
} else if(this.transcludeMode === "block") {
parseAsInline = false;
}
var parser;
if(this.transcludeVariable) {
parser = this.wiki.parseText(this.transcludeType,this.getVariable(this.transcludeVariable,""),{parseAsInline: !this.parseTreeNode.isBlock});
} else {
parser = this.wiki.parseTextReference(
this.transcludeTitle,
this.transcludeField,
this.transcludeIndex,
{
parseAsInline: parseAsInline,
subTiddler: this.transcludeSubTiddler
});
}
var parseTreeNodes = parser ? parser.tree : (this.slotValueParseTrees["ts-missing"] || []);
this.sourceText = parser ? parser.source : undefined;
this.parserType = parser? parser.type : undefined;
// Wrap the transcluded content if required
if(this.slotValueParseTrees["ts-wrapper"]) {
this.slotValueParseTrees["ts-wrapped"] = parseTreeNodes;
parseTreeNodes = this.slotValueParseTrees["ts-wrapper"];
this.sourceTest = undefined;
this.sourceType = undefined;
}
// Set context variables for recursion detection
var recursionMarker = this.makeRecursionMarker();
if(this.recursionMarker === "yes") {
this.setVariable("ubertransclusion",recursionMarker);
}
// Check for recursion
if(parser) {
if(this.parentWidget && this.parentWidget.hasVariable("ubertransclusion",recursionMarker)) {
parseTreeNodes = [{type: "element", tag: "span", attributes: {
"class": {type: "string", value: "tc-error"}
}, children: [
{type: "text", text: $tw.language.getString("Error/RecursiveTransclusion")}
]}];
}
}
// Construct the child widgets
this.makeChildWidgets(parseTreeNodes);
};
/*
Fetch the value of a parameter
*/
UberTranscludeWidget.prototype.getTransclusionParameter = function(name,index,defaultValue) {
if(name in this.stringParametersByName) {
return this.stringParametersByName[name];
} else {
var name = "" + index;
if(name in this.stringParametersByName) {
return this.stringParametersByName[name];
}
}
return defaultValue;
};
/*
Fetch the value of a parameter identified by its position
*/
UberTranscludeWidget.prototype.getTransclusionParameterByPosition = function(index,defaultValue) {
if(index in this.stringParametersByPosition) {
return this.stringParametersByPosition[index];
} else {
return defaultValue;
}
};
/*
Fetch the value of a slot
*/
UberTranscludeWidget.prototype.getTransclusionSlotValue = function(name,defaultParseTreeNodes) {
if(name && this.slotValueParseTrees[name]) {
return this.slotValueParseTrees[name];
} else {
return defaultParseTreeNodes || [];
}
};
/*
Compose a string comprising the title, field and/or index to identify this transclusion for recursion detection
*/
UberTranscludeWidget.prototype.makeRecursionMarker = function() {
var attributes = Object.create(null);
$tw.utils.each(this.attributes,function(value,name) {
attributes[name] = value;
});
var output = [];
output.push("{");
output.push(this.getVariable("currentTiddler",{defaultValue: ""}));
output.push("|");
output.push(JSON.stringify(attributes));
output.push("}");
return output.join("");
};
UberTranscludeWidget.prototype.parserNeedsRefresh = function() {
var parserInfo = this.wiki.getTextReferenceParserInfo(this.transcludeTitle,this.transcludeField,this.transcludeIndex,{subTiddler:this.transcludeSubTiddler});
return (this.sourceText === undefined || parserInfo.sourceText !== this.sourceText || parserInfo.parserType !== this.parserType)
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
UberTranscludeWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(($tw.utils.count(changedAttributes) > 0) || (changedTiddlers[this.transcludeTitle] && this.parserNeedsRefresh())) {
this.refreshSelf();
return true;
} else {
return this.refreshChildren(changedTiddlers);
}
};
exports.ubertransclude = UberTranscludeWidget;
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/widgets/value.js
type: application/javascript type: application/javascript
module-type: widget module-type: widget
Sub-widget used by the ubertransclude widget for specifying values for slots within transcluded content. It doesn't do anything by itself because the ubertransclude widget only ever deals with the parse tree nodes, and doesn't instantiate the widget itself Sub-widget used by the transclude widget for specifying values for slots within transcluded content. It doesn't do anything by itself because the transclude widget only ever deals with the parse tree nodes, and doesn't instantiate the widget itself
\*/ \*/
(function(){ (function(){

View File

@ -391,10 +391,10 @@ Widget.prototype.makeChildWidget = function(parseTreeNode,options) {
options = options || {}; options = options || {};
// Check whether this node type is defined by a custom macro definition // Check whether this node type is defined by a custom macro definition
var variableDefinitionName = "<$" + parseTreeNode.type + ">"; var variableDefinitionName = "<$" + parseTreeNode.type + ">";
if(parseTreeNode.type !== "ubertransclude" && this.variables[variableDefinitionName] && this.variables[variableDefinitionName].value) { if(parseTreeNode.type !== "transclude" && this.variables[variableDefinitionName] && this.variables[variableDefinitionName].value) {
var newParseTreeNode = { var newParseTreeNode = {
type: "ubertransclude", type: "transclude",
tag: "$ubertransclude", tag: "$transclude",
attributes: { attributes: {
"$variable": {name: "$variable", type: "string", value: variableDefinitionName} "$variable": {name: "$variable", type: "string", value: variableDefinitionName}
}, },
@ -436,7 +436,7 @@ Widget.prototype.makeChildWidget = function(parseTreeNode,options) {
] ]
}; };
$tw.utils.each(parseTreeNode.attributes,function(attr) { $tw.utils.each(parseTreeNode.attributes,function(attr) {
// If the attribute starts with a dollar then add an extra dollar so that it doesn't clash with the $xxx attributes of ubertransclude // If the attribute starts with a dollar then add an extra dollar so that it doesn't clash with the $xxx attributes of transclude
var name = attr.name.charAt(0) === "$" ? "$" + attr.name : attr.name, var name = attr.name.charAt(0) === "$" ? "$" + attr.name : attr.name,
newAttr = { newAttr = {
name: name, name: name,

View File

@ -1,4 +1,4 @@
title: Ubertransclude/CustomWidget/ActionWidget title: Transclude/CustomWidget/ActionWidget
description: Custom widget definition description: Custom widget definition
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -6,8 +6,8 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output title: Output
\whitespace trim \whitespace trim
<$ubertransclude $tiddler='Result'> <$transclude $tiddler='Result'>
</$ubertransclude> </$transclude>
_ _
title: Actions title: Actions

View File

@ -0,0 +1,35 @@
title: Transclude/CustomWidget/OverrideTransclude
description: Custom widget definition attempting to override transclude
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$transclude $tiddler='TiddlerOne' one='Ferret'>
</$transclude>
_
title: TiddlerZero
Antelope
_
title: TiddlerOne
\whitespace trim
<!-- Redefine the <$transclude> widget by defining a transcludable variable with that name -->
<$set name="<$transclude>" value="""\whitespace trim
<$parameters one='Jaguar'>
<$text text=<<one>>/>
<$slot $name="body">
Whale
</$slot>
</$parameters>"""
>
<$transclude $tiddler="TiddlerZero">
Crocodile
</$transclude>
</$set>
_
title: ExpectedResult
<p>Antelope</p>

View File

@ -1,4 +1,4 @@
title: Ubertransclude/CustomWidget/Simple title: Transclude/CustomWidget/Simple
description: Custom widget definition description: Custom widget definition
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -6,8 +6,8 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output title: Output
\whitespace trim \whitespace trim
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'> <$transclude $tiddler='TiddlerOne' one='Ferret'>
</$ubertransclude> </$transclude>
_ _
title: TiddlerOne title: TiddlerOne

View File

@ -1,4 +1,4 @@
title: Ubertransclude/CustomWidget/TextWidgetOverride title: Transclude/CustomWidget/TextWidgetOverride
description: Custom widget definition redefining the text widget description: Custom widget definition redefining the text widget
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -6,8 +6,8 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output title: Output
\whitespace trim \whitespace trim
<$ubertransclude $tiddler='TiddlerOne'> <$transclude $tiddler='TiddlerOne'>
</$ubertransclude> </$transclude>
_ _
title: TiddlerOne title: TiddlerOne

View File

@ -1,4 +1,4 @@
title: Ubertransclude/CustomWidget/VariableAttribute title: Transclude/CustomWidget/VariableAttribute
description: Custom widget definition using an attribute called $variable description: Custom widget definition using an attribute called $variable
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -6,8 +6,8 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output title: Output
\whitespace trim \whitespace trim
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'> <$transclude $tiddler='TiddlerOne' one='Ferret'>
</$ubertransclude> </$transclude>
_ _
title: TiddlerOne title: TiddlerOne

View File

@ -1,4 +1,4 @@
title: Ubertransclude/MissingTarget title: Transclude/MissingTarget
description: Transcluding a missing target description: Transcluding a missing target
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -6,34 +6,34 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output title: Output
\whitespace trim \whitespace trim
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'> <$transclude $tiddler='TiddlerOne' one='Ferret'>
<$parameters one='Ferret'> <$parameters one='Ferret'>
Badger Badger
<$text text=<<one>>/> <$text text=<<one>>/>
</$parameters> </$parameters>
</$ubertransclude> </$transclude>
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'> <$transclude $tiddler='TiddlerOne' one='Ferret'>
<$value $name="ts-missing"> <$value $name="ts-missing">
<$parameters one='Ferret'> <$parameters one='Ferret'>
Badger Badger
<$text text=<<one>>/> <$text text=<<one>>/>
</$parameters> </$parameters>
</$value> </$value>
</$ubertransclude> </$transclude>
<$ubertransclude $tiddler='MissingTiddler' one='Ferret'> <$transclude $tiddler='MissingTiddler' one='Ferret'>
<$parameters one='Ferret'> <$parameters one='Ferret'>
Badger Badger
<$text text=<<one>>/> <$text text=<<one>>/>
</$parameters> </$parameters>
</$ubertransclude> </$transclude>
<$ubertransclude $tiddler='MissingTiddler' one='Ferret'> <$transclude $tiddler='MissingTiddler' one='Ferret'>
<$value $name="ts-missing"> <$value $name="ts-missing">
<$parameters one='Ferret'> <$parameters one='Ferret'>
Badger Badger
<$text text=<<one>>/> <$text text=<<one>>/>
</$parameters> </$parameters>
</$value> </$value>
</$ubertransclude> </$transclude>
_ _
title: TiddlerOne title: TiddlerOne

View File

@ -1,4 +1,4 @@
title: Ubertransclude/Parameterised/Positional/Shortcut title: Transclude/Parameterised/Positional/Shortcut
description: Positional parameterised transclusion using shortcut syntax description: Positional parameterised transclusion using shortcut syntax
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -21,7 +21,7 @@ title: TiddlerTwo
\whitespace trim \whitespace trim
<$parameters zero='Mouse' one='Horse' two='Owl'> <$parameters zero='Mouse' one='Horse' two='Owl'>
(<$ubertransclude zero=<<zero>> one=<<one>> two=<<two>>/>) (<$transclude $tiddler=<<currentTiddler>> zero=<<zero>> one=<<one>> two=<<two>>/>)
</$parameters> </$parameters>
_ _
title: ExpectedResult title: ExpectedResult

View File

@ -0,0 +1,26 @@
title: Transclude/Parameterised/Positional
description: Positional parameterised transclusion
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$transclude $tiddler='TiddlerOne' zero='Ferret'/>
<$transclude zero='Ferret' $tiddler='TiddlerOne'/>
<$transclude $tiddler='TiddlerOne' 0='Pigeon'/>
<$transclude 0='Pigeon' $tiddler='TiddlerOne'/>
<$transclude $tiddler='TiddlerOne' zero='Ferret' 0='Pigeon'/>
<$transclude zero='Ferret' 0='Pigeon' $tiddler='TiddlerOne'/>
<$transclude $tiddler='TiddlerOne'/>
_
title: TiddlerOne
\whitespace trim
<$parameters zero='Jaguar'>
<$text text=<<zero>>/>
</$parameters>
_
title: ExpectedResult
<p>FerretFerretPigeonPigeonFerretFerretJaguar</p>

View File

@ -1,4 +1,4 @@
title: Ubertransclude/Parameterised/Simple title: Transclude/Parameterised/Simple
description: Simple parameterised transclusion description: Simple parameterised transclusion
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -6,8 +6,8 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output title: Output
\whitespace trim \whitespace trim
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'/> <$transclude $tiddler='TiddlerOne' one='Ferret'/>
<$ubertransclude $tiddler='TiddlerOne'/> <$transclude $tiddler='TiddlerOne'/>
_ _
title: TiddlerOne title: TiddlerOne

View File

@ -1,4 +1,4 @@
title: Ubertransclude/Parameterised/Slotted/Missing title: Transclude/Parameterised/Slotted/Missing
description: Parameterised transclusion with slotted missing values description: Parameterised transclusion with slotted missing values
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -6,8 +6,8 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output title: Output
\whitespace trim \whitespace trim
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'> <$transclude $tiddler='TiddlerOne' one='Ferret'>
</$ubertransclude> </$transclude>
_ _
title: TiddlerOne title: TiddlerOne

View File

@ -1,4 +1,4 @@
title: Ubertransclude/Parameterised/Slotted title: Transclude/Parameterised/Slotted
description: Parameterised transclusion with slotted values description: Parameterised transclusion with slotted values
type: text/vnd.tiddlywiki-multiple type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]] tags: [[$:/tags/wiki-test-spec]]
@ -6,11 +6,11 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output title: Output
\whitespace trim \whitespace trim
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'> <$transclude $tiddler='TiddlerOne' one='Ferret'>
<$value $name="content"> <$value $name="content">
Hippopotamus Hippopotamus
</$value> </$value>
</$ubertransclude> </$transclude>
_ _
title: TiddlerOne title: TiddlerOne

View File

@ -1,35 +0,0 @@
title: Ubertransclude/CustomWidget/OverrideUbertransclude
description: Custom widget definition attempting to override ubertransclude
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'>
</$ubertransclude>
_
title: TiddlerZero
Antelope
_
title: TiddlerOne
\whitespace trim
<!-- Redefine the <$ubertransclude> widget by defining a transcludable variable with that name -->
<$set name="<$ubertransclude>" value="""\whitespace trim
<$parameters one='Jaguar'>
<$text text=<<one>>/>
<$slot $name="body">
Whale
</$slot>
</$parameters>"""
>
<$ubertransclude $tiddler="TiddlerZero">
Crocodile
</$ubertransclude>
</$set>
_
title: ExpectedResult
<p>Antelope</p>

View File

@ -1,26 +0,0 @@
title: Ubertransclude/Parameterised/Positional
description: Positional parameterised transclusion
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$ubertransclude $tiddler='TiddlerOne' zero='Ferret'/>
<$ubertransclude zero='Ferret' $tiddler='TiddlerOne'/>
<$ubertransclude $tiddler='TiddlerOne' 0='Pigeon'/>
<$ubertransclude 0='Pigeon' $tiddler='TiddlerOne'/>
<$ubertransclude $tiddler='TiddlerOne' zero='Ferret' 0='Pigeon'/>
<$ubertransclude zero='Ferret' 0='Pigeon' $tiddler='TiddlerOne'/>
<$ubertransclude $tiddler='TiddlerOne'/>
_
title: TiddlerOne
\whitespace trim
<$parameters zero='Jaguar'>
<$text text=<<zero>>/>
</$parameters>
_
title: ExpectedResult
<p>FerretFerretPigeonPigeonFerretFerretJaguar</p>