mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Remove support for $:/tags/Global
It is not needed now that we have true global variables
This commit is contained in:
parent
613f4af20f
commit
f513b403fe
@ -1075,20 +1075,9 @@ exports.makeWidget = function(parser,options) {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
var widgetNode = {
|
var widgetNode = {
|
||||||
type: "widget",
|
type: "widget",
|
||||||
children: [{
|
children: []
|
||||||
type: "importvariables",
|
|
||||||
attributes: {
|
|
||||||
filter: {
|
|
||||||
name: "filter",
|
|
||||||
type: "string",
|
|
||||||
value: "[all[shadows+tiddlers]tag[$:/tags/Global]!is[draft]]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isBlock: false,
|
|
||||||
children: []
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
currWidgetNode = widgetNode.children[0];
|
currWidgetNode = widgetNode;
|
||||||
// Create let variable widget for variables
|
// Create let variable widget for variables
|
||||||
if($tw.utils.count(options.variables) > 0) {
|
if($tw.utils.count(options.variables) > 0) {
|
||||||
var letVariableWidget = {
|
var letVariableWidget = {
|
||||||
@ -1098,14 +1087,10 @@ exports.makeWidget = function(parser,options) {
|
|||||||
children: []
|
children: []
|
||||||
};
|
};
|
||||||
$tw.utils.each(options.variables,function(value,name) {
|
$tw.utils.each(options.variables,function(value,name) {
|
||||||
letVariableWidget.attributes[name] = {
|
$tw.utils.addAttributeToParseTreeNode(letVariableWidget,name,"" + value);
|
||||||
name: name,
|
|
||||||
type: "string",
|
|
||||||
value: "" + value
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
currWidgetNode.children = [letVariableWidget];
|
currWidgetNode.children = [letVariableWidget];
|
||||||
currWidgetNode = letVariableWidget;
|
currWidgetNode = letVariableWidget.children[0];
|
||||||
}
|
}
|
||||||
// Add in the supplied parse tree nodes
|
// Add in the supplied parse tree nodes
|
||||||
currWidgetNode.children = parser ? parser.tree : [];
|
currWidgetNode.children = parser ? parser.tree : [];
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
title: Globals/Simple
|
|
||||||
description: Global procedures
|
|
||||||
type: text/vnd.tiddlywiki-multiple
|
|
||||||
tags: [[$:/tags/wiki-test-spec]]
|
|
||||||
|
|
||||||
title: Output
|
|
||||||
|
|
||||||
\whitespace trim
|
|
||||||
|
|
||||||
<<this-is-one>>
|
|
||||||
+
|
|
||||||
title: One
|
|
||||||
tags: $:/tags/Global
|
|
||||||
|
|
||||||
\procedure this-is-one() ONE
|
|
||||||
+
|
|
||||||
title: ExpectedResult
|
|
||||||
|
|
||||||
<p>ONE</p>
|
|
Loading…
Reference in New Issue
Block a user