mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-24 02:27:19 +00:00
Fix importvariables to work with setvariables as well as set (they are aliases)
This commit is contained in:
parent
45b7b4bc6d
commit
dec45f0fc3
@ -49,8 +49,7 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) {
|
||||
var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true});
|
||||
if(parser) {
|
||||
var parseTreeNode = parser.tree[0];
|
||||
while(parseTreeNode && ["set","parameters"].indexOf(parseTreeNode.type) !== -1) {
|
||||
if(parseTreeNode.type === "set") {
|
||||
while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) {
|
||||
var node = {
|
||||
type: "set",
|
||||
attributes: parseTreeNode.attributes,
|
||||
@ -61,7 +60,8 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) {
|
||||
isWidgetDefinition: parseTreeNode.isWidgetDefinition,
|
||||
configTrimWhiteSpace: parseTreeNode.configTrimWhiteSpace
|
||||
};
|
||||
if (parseTreeNode.isMacroDefinition || parseTreeNode.isProcedureDefinition) {
|
||||
if(parseTreeNode.type === "set" || parseTreeNode.type === "setvariable") {
|
||||
if(parseTreeNode.isMacroDefinition || parseTreeNode.isProcedureDefinition || parseTreeNode.isWidgetDefinition || parseTreeNode.isFunctionDefinition) {
|
||||
// Macro definitions can be folded into
|
||||
// current widget instead of adding
|
||||
// another link to the chain.
|
||||
|
Loading…
Reference in New Issue
Block a user