-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Global variables set by $set widget don't work #8519
Comments
The last example needs a |
SetWidget requires strict adherence to undocumented rules regarding whitespace sensitivities? That's a bug too, IMO. |
I can't even bring myself to word it: "Oh and by the way, don't indent anything in this example, SetWidgets used to define global variables will break (silently)." 👎 |
I had a closer look at the code. The problem was introduced with commit: 967e2b7 which fixes issue: #7909 So fixing the problem with
|
There should be a new test similar to https://github.com/TiddlyWiki/TiddlyWiki5/blob/967e2b7fef0a7f1277e53187a412b6a190e72363/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid but without @Jermolene -- This new test will also need to pass |
The "WithSetWidget2" test should be the test without the whitespace pragma but there seems to be a copy paste error.
|
I did have a closer look at the $importvariables widget code. I think it has to be fixed there. If there are "text-nodes" that contains whitespace only, they should be ignored. As soon as there are "real" text nodes or any other "node-type" import is not possible. -- As it is now. IMO adding a new flag to the parser, without knowing anything about the tiddler to be imported, is not possible. |
Hi @pmario the problem here is that importvariables must parse the tiddlers with whitespace trim so that it ignores whitespace between set widgets. However we don't want procedures to inherit the setting in this case unless the tiddler in which they appear has an explicit |
Describe the bug
See https://talk.tiddlywiki.org/t/best-widget-to-hold-a-static-variable/10412/11
Expected behavior
That the variables are made global as per docs at https://tiddlywiki.com/#SetWidget
To Reproduce
OR
Or even... (would be nice)
Screenshots
TiddlyWiki Configuration
tiddlywiki.com
Additional context
No response
The text was updated successfully, but these errors were encountered: