1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-29 08:43:14 +00:00

Use ts- prefix for system slot names

This commit is contained in:
jeremy@jermolene.com 2022-04-26 14:27:28 +01:00
parent fae038dcbc
commit a401732995
6 changed files with 13 additions and 13 deletions

View File

@ -65,7 +65,7 @@ UberTranscludeWidget.prototype.execute = function() {
};
searchParseTreeNodes(this.parseTreeNode.children);
if(noValueWidgetsFound) {
this.slotValueParseTrees["missing"] = this.parseTreeNode.children;
this.slotValueParseTrees["ts-missing"] = this.parseTreeNode.children;
}
// Parse the text reference
var parseAsInline = !this.parseTreeNode.isBlock;
@ -87,13 +87,13 @@ UberTranscludeWidget.prototype.execute = function() {
subTiddler: this.transcludeSubTiddler
});
}
var parseTreeNodes = parser ? parser.tree : (this.slotValueParseTrees["missing"] || []);
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["wrapper"]) {
this.slotValueParseTrees["wrapped"] = parseTreeNodes;
parseTreeNodes = this.slotValueParseTrees["wrapper"];
if(this.slotValueParseTrees["ts-wrapper"]) {
this.slotValueParseTrees["ts-wrapped"] = parseTreeNodes;
parseTreeNodes = this.slotValueParseTrees["ts-wrapper"];
this.sourceTest = undefined;
this.sourceType = undefined;
}

View File

@ -403,7 +403,7 @@ Widget.prototype.makeChildWidget = function(parseTreeNode,options) {
type: "value",
tag: "$value",
attributes: {
"$name": {name: "$name", type: "string", value: "body"}
"$name": {name: "$name", type: "string", value: "ts-body"}
},
children: parseTreeNode.children
},
@ -411,7 +411,7 @@ Widget.prototype.makeChildWidget = function(parseTreeNode,options) {
type: "value",
tag: "$value",
attributes: {
"$name": {name: "$name", type: "string", value: "wrapper"}
"$name": {name: "$name", type: "string", value: "ts-wrapper"}
},
children: [
{
@ -426,7 +426,7 @@ Widget.prototype.makeChildWidget = function(parseTreeNode,options) {
type: "slot",
tag: "$slot",
attributes: {
"$name": {name: "$name", type: "string", value: "wrapped"}
"$name": {name: "$name", type: "string", value: "ts-wrapped"}
}
}
]

View File

@ -16,7 +16,7 @@ title: TiddlerOne
<$set name="<$mywidget>" value="""\whitespace trim
<$parameters one='Jaguar'>
<$text text=<<one>>/>
<$slot $name="body">
<$slot $name="ts-body">
Whale
</$slot>
</$parameters>"""

View File

@ -16,7 +16,7 @@ title: TiddlerOne
<$set name="<$text>" value="""\whitespace trim
<$parameters text='Jaguar'>
<$text text=<<text>>/>
<$slot $name="body">
<$slot $name="ts-body">
Whale
</$slot>
</$parameters>"""

View File

@ -16,7 +16,7 @@ title: TiddlerOne
<$set name="<$mywidget>" value="""\whitespace trim
<$parameters $variable='Jaguar'>
<$text text=<<$variable>>/>
<$slot $name="body">
<$slot $name="ts-body">
Whale
</$slot>
</$parameters>"""

View File

@ -13,7 +13,7 @@ title: Output
</$parameters>
</$ubertransclude>
<$ubertransclude $tiddler='TiddlerOne' one='Ferret'>
<$value $name="missing">
<$value $name="ts-missing">
<$parameters one='Ferret'>
Badger
<$text text=<<one>>/>
@ -27,7 +27,7 @@ title: Output
</$parameters>
</$ubertransclude>
<$ubertransclude $tiddler='MissingTiddler' one='Ferret'>
<$value $name="missing">
<$value $name="ts-missing">
<$parameters one='Ferret'>
Badger
<$text text=<<one>>/>