mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-23 07:26:54 +00:00
Transclude widget should only create double underscore variables for macros and ordinary variables
Fixes #7544
This commit is contained in:
parent
d8124ee82d
commit
b90c9ef9a0
@ -178,7 +178,6 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
|||||||
srcVariable = variableInfo && variableInfo.srcVariable;
|
srcVariable = variableInfo && variableInfo.srcVariable;
|
||||||
if(variableInfo.text) {
|
if(variableInfo.text) {
|
||||||
if(srcVariable.isFunctionDefinition) {
|
if(srcVariable.isFunctionDefinition) {
|
||||||
// Function to return parameters by name or position
|
|
||||||
var result = (variableInfo.resultList ? variableInfo.resultList[0] : variableInfo.text) || "";
|
var result = (variableInfo.resultList ? variableInfo.resultList[0] : variableInfo.text) || "";
|
||||||
parser = {
|
parser = {
|
||||||
tree: [{
|
tree: [{
|
||||||
@ -235,7 +234,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
|||||||
}
|
}
|
||||||
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
||||||
});
|
});
|
||||||
} else {
|
} else if(srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition) {
|
||||||
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
||||||
parser = {
|
parser = {
|
||||||
tree: [
|
tree: [
|
||||||
|
Loading…
Reference in New Issue
Block a user