mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-22 23:16:53 +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;
|
||||
if(variableInfo.text) {
|
||||
if(srcVariable.isFunctionDefinition) {
|
||||
// Function to return parameters by name or position
|
||||
var result = (variableInfo.resultList ? variableInfo.resultList[0] : variableInfo.text) || "";
|
||||
parser = {
|
||||
tree: [{
|
||||
@ -235,7 +234,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
||||
}
|
||||
$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__"
|
||||
parser = {
|
||||
tree: [
|
||||
|
Loading…
Reference in New Issue
Block a user