mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +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 || {};
|
||||
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 : [];
|
||||
|
@ -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