Remove support for $:/tags/Global

It is not needed now that we have true global variables
This commit is contained in:
jeremy@jermolene.com 2022-06-01 08:24:20 +01:00
parent 613f4af20f
commit f513b403fe
2 changed files with 4 additions and 38 deletions

View File

@ -1075,20 +1075,9 @@ exports.makeWidget = function(parser,options) {
options = options || {};
var widgetNode = {
type: "widget",
children: [{
type: "importvariables",
attributes: {
filter: {
name: "filter",
type: "string",
value: "[all[shadows+tiddlers]tag[$:/tags/Global]!is[draft]]"
}
},
isBlock: false,
children: []
}]
children: []
},
currWidgetNode = widgetNode.children[0];
currWidgetNode = widgetNode;
// Create let variable widget for variables
if($tw.utils.count(options.variables) > 0) {
var letVariableWidget = {
@ -1098,14 +1087,10 @@ exports.makeWidget = function(parser,options) {
children: []
};
$tw.utils.each(options.variables,function(value,name) {
letVariableWidget.attributes[name] = {
name: name,
type: "string",
value: "" + value
}
$tw.utils.addAttributeToParseTreeNode(letVariableWidget,name,"" + value);
});
currWidgetNode.children = [letVariableWidget];
currWidgetNode = letVariableWidget;
currWidgetNode = letVariableWidget.children[0];
}
// Add in the supplied parse tree nodes
currWidgetNode.children = parser ? parser.tree : [];

View File

@ -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>