jeremy@jermolene.com
8816efa737
Restore standard sitetitle
2023-04-19 11:51:32 +01:00
jeremy@jermolene.com
093274f0fa
Remove custom CI step for this branch
2023-04-19 11:51:21 +01:00
jeremy@jermolene.com
3b3879df03
Update 5.3.0 release note
2023-04-19 11:35:25 +01:00
jeremy@jermolene.com
55e38eb89a
Update modification times of doc tiddlers
...
So that they are at the top of the recent tab
2023-04-19 11:32:34 +01:00
jeremy@jermolene.com
b91872bed1
Merge branch 'master' into parameterised-transclusions
2023-04-18 10:48:39 +01:00
jeremy@jermolene.com
f41051b621
Merge branch 'master' into parameterised-transclusions
2023-04-12 17:11:38 +01:00
jeremy@jermolene.com
3689171198
Merge branch 'master' into parameterised-transclusions
2023-04-10 16:07:54 +01:00
jeremy@jermolene.com
a2cbb6f992
Merge branch 'master' into parameterised-transclusions
2023-04-06 16:11:54 +01:00
jeremy@jermolene.com
5b271bb4f4
Fix nonstandard initialisation code for fill/parameter/slot widgets
2023-04-06 08:50:47 +01:00
jeremy@jermolene.com
bb2dea2414
Remove 5.2.8 release note
2023-04-02 14:42:39 +01:00
jeremy@jermolene.com
7ba666bd53
Merge branch 'master' into parameterised-transclusions
2023-04-02 14:00:47 +01:00
jeremy@jermolene.com
cff3db6eaa
Merge branch 'master' into parameterised-transclusions
2023-03-26 08:29:41 +01:00
jeremy@jermolene.com
8c98fc4ab1
Merge branch 'master' into parameterised-transclusions
2023-03-21 08:08:18 +00:00
jeremy@jermolene.com
e2cc32aa75
Merge branch 'master' into parameterised-transclusions
2023-03-18 16:04:20 +00:00
jeremy@jermolene.com
f9751f19b6
Merge branch 'master' into parameterised-transclusions
2023-03-12 16:19:30 +00:00
jeremy@jermolene.com
2a2939f4eb
Merge branch 'master' into parameterised-transclusions
2023-03-10 09:10:27 +00:00
jeremy@jermolene.com
f417bdb742
Merge branch 'master' into parameterised-transclusions
2023-03-06 09:06:41 +00:00
jeremy@jermolene.com
ea055f2ba5
Merge branch 'master' into parameterised-transclusions
2023-02-28 08:45:56 +00:00
jeremy@jermolene.com
0d1667c467
Merge branch 'master' into parameterised-transclusions
2023-02-10 16:04:08 +00:00
jeremy@jermolene.com
86569e5ade
Merge branch 'master' into parameterised-transclusions
2023-01-30 21:43:00 +00:00
jeremy@jermolene.com
1dea0a03b8
Merge branch 'master' into parameterised-transclusions
2023-01-30 09:43:54 +00:00
jeremy@jermolene.com
59895db097
Merge branch 'master' into parameterised-transclusions
2023-01-23 16:36:56 +00:00
jeremy@jermolene.com
683414f51e
Fix positional parameters in widget.evaluateVariable()
...
This should clear up the remaining anomalies in #7009 , let me know how you get on @btheado
2023-01-23 16:34:08 +00:00
jeremy@jermolene.com
34afe4e143
Refactor function invocation
...
* Introduce new widget helper function to evaluate variables.Functions are evaluated as parameterised filter strings, macros as text with textual substitution of parameters and variables, and procedures and widgets as plain text
* Refactor the function operator and unknown operator to use the new helper
* Use the new helper to evaluate variables within filter strings, thus fixing a bug whereby functions called in such a way were being returned as plain text instead of being evaluated
* Refactor the transclude widget to use the new helper
* Update tests
2023-01-21 22:07:34 +00:00
jeremy@jermolene.com
d4ab427ceb
Refactor wikified function tests
2023-01-21 21:04:43 +00:00
jeremy@jermolene.com
a62d7f1b0d
Merge branch 'master' into parameterised-transclusions
2023-01-21 20:45:21 +00:00
jeremy@jermolene.com
66cf779abb
Merge branch 'master' into parameterised-transclusions
2023-01-18 09:05:48 +00:00
jeremy@jermolene.com
81002f9f30
Merge branch 'master' into parameterised-transclusions
2023-01-17 16:40:47 +00:00
jeremy@jermolene.com
923f9084f8
New test missed off a45349cc99
2023-01-11 09:15:40 +00:00
jeremy@jermolene.com
a45349cc99
Fix detection of empty transclusions
...
See https://talk.tiddlywiki.org/t/exploring-default-tiddler-links-hackability-in-v5-3-0/5745/25?u=jeremyruston
2023-01-11 08:57:54 +00:00
jeremy@jermolene.com
7a4a8bd3f6
Rename test
2023-01-07 09:41:39 +00:00
jeremy@jermolene.com
4f96465141
Merge branch 'master' into parameterised-transclusions
2023-01-07 09:34:11 +00:00
jeremy@jermolene.com
76e3a341da
Merge branch 'master' into parameterised-transclusions
2022-12-21 17:26:10 +00:00
jeremy@jermolene.com
34bd0f0ae5
Merge branch 'master' into parameterised-transclusions
2022-12-13 17:31:51 +00:00
jeremy@jermolene.com
34ce7cacc3
Merge branch 'master' into parameterised-transclusions
2022-12-13 11:08:54 +00:00
jeremy@jermolene.com
2bf9e97eb5
Merge branch 'master' into parameterised-transclusions
2022-12-08 08:29:56 +00:00
jeremy@jermolene.com
be65819441
Docs note about nested macro definitions
2022-12-07 10:01:58 +00:00
jeremy@jermolene.com
5bb7168c02
Merge branch 'master' into parameterised-transclusions
2022-12-07 10:01:38 +00:00
jeremy@jermolene.com
31f4c1f6af
Merge branch 'master' into parameterised-transclusions
2022-12-05 17:21:33 +00:00
jeremy@jermolene.com
b802b0cb09
Merge branch 'master' into parameterised-transclusions
2022-11-27 13:56:33 +00:00
jeremy@jermolene.com
b5e4b21707
Merge branch 'master' into parameterised-transclusions
2022-11-27 12:40:51 +00:00
jeremy@jermolene.com
52592a4dbc
Add support for named end markers for procedures, functions and widgets
2022-11-23 16:30:20 +00:00
jeremy@jermolene.com
b78f8769a9
Docs: move tiddlers to correct directory
2022-11-23 16:27:39 +00:00
jeremy@jermolene.com
39d88bf156
Docs: Update \define pragma to cover named ends
2022-11-23 09:02:39 +00:00
jeremy@jermolene.com
778b8dec7f
Merge branch 'master' into parameterised-transclusions
2022-11-23 09:01:42 +00:00
jeremy@jermolene.com
45958db074
Merge branch 'master' into parameterised-transclusions
2022-11-22 16:29:45 +00:00
jeremy@jermolene.com
846edbfaa4
Merge branch 'master' into parameterised-transclusions
2022-11-16 08:27:00 +00:00
jeremy@jermolene.com
4e3566745e
Merge branch 'master' into parameterised-transclusions
2022-11-15 11:46:04 +00:00
jeremy@jermolene.com
70930e16b2
Merge branch 'master' into parameterised-transclusions
2022-11-15 10:39:29 +00:00
jeremy@jermolene.com
149d6c2d73
Docs: clarify function operator invocation
...
See discussion at https://github.com/Jermolene/TiddlyWiki5/issues/6991#issuecomment-1301703599
2022-11-05 10:13:35 +00:00
jeremy@jermolene.com
478b585a8c
Merge branch 'master' into parameterised-transclusions
2022-11-02 08:21:17 +00:00
jeremy@jermolene.com
9029588b2c
Merge branch 'master' into parameterised-transclusions
2022-10-30 21:21:48 +00:00
jeremy@jermolene.com
38ac1e4bfd
Merge branch 'master' into parameterised-transclusions
2022-10-30 21:21:21 +00:00
jeremy@jermolene.com
e7caa0c739
Docs typo
...
Thanks @twMat
2022-10-30 21:17:55 +00:00
jeremy@jermolene.com
9f42007899
Filter run prefixes should use widget.makeFakeWidgetWithVariables
2022-10-25 14:13:38 +01:00
jeremy@jermolene.com
b426724f35
Fix macrocall refresh issue
...
It turns out that this.transcludeTitle is always truthy, even if we are transcluding a variable
Fixes #7001
2022-10-20 15:08:05 +01:00
jeremy@jermolene.com
ffc2594fef
Add parenthesis to the visible transclusion definition
...
Parenthesis were made mandatory in 5194b24108
Fixes #6998
2022-10-19 15:35:43 +01:00
jeremy@jermolene.com
c171c441f5
Update release note
2022-10-19 09:42:41 +01:00
jeremy@jermolene.com
33de634606
Adjust modified times of docs tiddlers to make them easier to find
2022-10-19 09:15:38 +01:00
jeremy@jermolene.com
120b93c242
New test for undefined parameters
2022-10-19 08:37:27 +01:00
jeremy@jermolene.com
14e0a271d4
New New Release Banner
2022-10-19 08:37:04 +01:00
jeremy@jermolene.com
bc375c04b9
Temporary new release banner for v5.3.0
2022-10-19 08:14:29 +01:00
jeremy@jermolene.com
55c7eea52d
Add release note etc for 5.3.0
2022-10-18 17:40:13 +01:00
jeremy@jermolene.com
45f1cf6cff
Attempt to build this branch with CI
2022-10-18 17:27:47 +01:00
jeremy@jermolene.com
32710ef9e6
Merge branch 'master' into parameterised-transclusions
2022-10-18 17:23:57 +01:00
jeremy@jermolene.com
5194b24108
Parameter parenthesis should be mandatory in function/procedure/widget definitions
...
See https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1280404387
2022-10-17 08:31:07 +01:00
jeremy@jermolene.com
3a4589dc79
Transcluding functions: fix missing parameters passed as undefined
...
Thanks @btheado – see https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1276187372
2022-10-12 17:15:39 +01:00
jeremy@jermolene.com
76bc3a7358
Docs typo
...
https://github.com/Jermolene/TiddlyWiki5/pull/6666#discussion_r990811220
Thanks @btheado
2022-10-09 17:48:24 +01:00
jeremy@jermolene.com
85a203bcf2
Revert modified date of docs that have only had minor tweaks
2022-10-09 17:43:38 +01:00
jeremy@jermolene.com
c25129584c
Docs updates
2022-10-09 17:34:22 +01:00
jeremy@jermolene.com
1c73460ecc
Fix doc file locations
2022-10-09 13:56:36 +01:00
jeremy@jermolene.com
ef93fc29bf
More docs updates
2022-10-09 13:54:33 +01:00
jeremy@jermolene.com
9d4aa47356
Clarify/simplify some tests
2022-10-09 13:54:08 +01:00
jeremy@jermolene.com
12a87840fd
Merge branch 'master' into parameterised-transclusions
2022-10-07 16:57:54 +01:00
jeremy@jermolene.com
dcbff82460
Docs updates
2022-10-07 16:56:21 +01:00
jeremy@jermolene.com
6be996a858
Docs update
2022-10-06 21:37:14 +01:00
jeremy@jermolene.com
bf41e08c2f
Revert change to setwidget docs
2022-10-06 10:30:40 +01:00
jeremy@jermolene.com
9641345b92
Docs updates
2022-10-03 14:40:27 +01:00
jeremy@jermolene.com
93100a1c8f
Remove support for conditional definitions
...
It was introduced for use cases associated with the global mechanism that was dropped in e3d13696c8
2022-10-03 14:39:45 +01:00
jeremy@jermolene.com
b6796863e8
Merge branch 'master' into parameterised-transclusions
2022-10-01 14:05:54 +01:00
jeremy@jermolene.com
0a309f4865
Merge branch 'master' into parameterised-transclusions
2022-10-01 10:18:34 +01:00
jeremy@jermolene.com
668168dfea
Some widget.js cleanups
2022-09-27 08:58:10 +01:00
jeremy@jermolene.com
502a1ab70d
Merge branch 'master' into parameterised-transclusions
2022-09-27 08:56:58 +01:00
jeremy@jermolene.com
109edd1b76
Docs update
2022-09-24 15:09:12 +01:00
jeremy@jermolene.com
d950835e2f
Docs clarification
2022-09-24 15:05:54 +01:00
jeremy@jermolene.com
a482f01352
Merge branch 'master' into parameterised-transclusions
2022-09-24 14:08:44 +01:00
jeremy@jermolene.com
e3d13696c8
Remove implementation of $:/globals/
...
Performance with this implementation is inherently poor because of the need to perform a wiki lookup for each child widget created.
2022-09-24 12:56:06 +01:00
jeremy@jermolene.com
1aba8a1f65
Slight optimisation to user defined widgets
2022-09-24 12:41:28 +01:00
jeremy@jermolene.com
fddaa9fdb1
Merge branch 'master' into parameterised-transclusions
2022-09-24 11:07:53 +01:00
jeremy@jermolene.com
0c88467111
Merge branch 'master' into parameterised-transclusions
2022-09-22 10:35:01 +01:00
jeremy@jermolene.com
c3589357bf
Huge Documentation Update
...
Not quite finished, but definitely on the home stretch
2022-09-21 10:41:03 +01:00
jeremy@jermolene.com
0196844f17
Merge branch 'master' into parameterised-transclusions
2022-09-21 09:33:24 +01:00
jeremy@jermolene.com
6847906bea
Docs typo
2022-09-16 16:33:04 +01:00
jeremy@jermolene.com
fe6186b1c1
Docs update
2022-09-16 16:07:58 +01:00
jeremy@jermolene.com
3090bb104e
Fix visible transclude
2022-09-16 16:07:44 +01:00
jeremy@jermolene.com
8f9d5cabaa
Missing tests for parameters widget
2022-09-16 16:07:32 +01:00
jeremy@jermolene.com
fa86631d2e
Improve indentation
...
See https://github.com/Jermolene/TiddlyWiki5/pull/6666#discussion_r967655251
2022-09-13 16:29:09 +01:00
jeremy@jermolene.com
ef677c39c0
Docs tweaks
2022-09-11 10:57:35 +01:00
jeremy@jermolene.com
a3ba6f9370
Tests and docs for function operator
2022-09-11 10:49:02 +01:00
jeremy@jermolene.com
cc7b276787
Remove negation from function operator
...
This implementation was not useful.
2022-09-11 10:48:37 +01:00
jeremy@jermolene.com
68a1d61f33
Update function operator to return the input list if the function is missing
2022-09-11 10:48:05 +01:00
jeremy@jermolene.com
ecd467496d
Add custom view template body for globals, and a new sidebar tab under "more"
...
And also a custom view template title that greys out the $:/global/ part of the title
2022-09-10 11:03:40 +01:00
jeremy@jermolene.com
580e33d30f
Merge branch 'master' into parameterised-transclusions
2022-09-10 11:01:45 +01:00
jeremy@jermolene.com
977a133028
Tweak comments
2022-09-09 14:16:08 +01:00
jeremy@jermolene.com
7aba21c1be
Docs updates
2022-09-09 14:15:56 +01:00
jeremy@jermolene.com
32a6b6bb90
Docs updates
2022-09-09 12:05:08 +01:00
jeremy@jermolene.com
b751f7e793
Parameters widget: protect against negative $depth
2022-09-09 12:04:50 +01:00
jeremy@jermolene.com
82b22523aa
Rejig genesis widget to be easier to use
2022-09-09 10:37:39 +01:00
jeremy@jermolene.com
e3697e29bb
When transcluding functions, pass an empty item list to the filter, and just return the first item
2022-09-09 10:22:06 +01:00
jeremy@jermolene.com
7b465888c8
Revert "WIP"
...
This reverts commit 8654dfc679 .
2022-09-04 16:43:40 +01:00
jeremy@jermolene.com
8654dfc679
WIP
2022-09-04 16:41:25 +01:00
jeremy@jermolene.com
5c860ed39b
Fix error in 25312b3e32
2022-09-04 16:26:47 +01:00
jeremy@jermolene.com
25312b3e32
Refactor filter recursion detection to avoid an unneeded wrapper function
2022-09-04 16:23:49 +01:00
jeremy@jermolene.com
11e0c66a4c
Transcluded functions should operate on the entire store
2022-09-03 20:11:45 +01:00
jeremy@jermolene.com
a439cb58be
Fix caching of parse variables/macros/procedures
2022-09-03 20:11:23 +01:00
jeremy@jermolene.com
966707ea1c
More comments
2022-09-03 16:57:38 +01:00
jeremy@jermolene.com
1b08cd40bf
Coding style tweak
2022-09-03 16:36:36 +01:00
jeremy@jermolene.com
00b6645c94
Disable overriding core widgets in safe mode
2022-09-03 12:58:10 +01:00
jeremy@jermolene.com
f6ee0cdf4c
Add test to show that global widgets need not use the _parameters field
2022-09-03 12:57:45 +01:00
jeremy@jermolene.com
36058cba89
Merge branch 'master' into parameterised-transclusions
2022-09-03 10:55:29 +01:00
jeremy@jermolene.com
389330436d
Revert changes to parse tree preview
...
This implementation requires #6666
2022-09-03 10:52:34 +01:00
jeremy@jermolene.com
15ea3ffa9a
Remove tests related to obsolete changes to boot.js
...
Should have been part of 2f494ba152
2022-09-02 20:10:11 +01:00
jeremy@jermolene.com
bf4a187ee1
Fix inadvertent whitespace change
2022-09-02 20:05:24 +01:00
jeremy@jermolene.com
2f494ba152
Revert obsolete changes to boot.js
2022-09-02 20:03:33 +01:00
jeremy@jermolene.com
f0fa1af3a8
Merge branch 'master' into parameterised-transclusions
2022-09-02 18:17:32 +01:00
jeremy@jermolene.com
d852123f61
Tweak semantics of JSON operators to match #6932
...
This allows us to later bring in the optimisations without breaking backwards compatibility.
2022-09-02 17:14:50 +01:00
jeremy@jermolene.com
54e1083dd6
Merge branch 'master' into parameterised-transclusions
2022-09-01 09:00:57 +01:00
jeremy@jermolene.com
2b8b133d4a
Merge branch 'master' into parameterised-transclusions
2022-08-17 18:11:21 +01:00
jeremy@jermolene.com
9317804464
FIx transcluding of functions
...
This first implementation concatenates the results of the filter (with no separator) and then wikifies the result.
The test in this commit is quite interesting...
2022-08-04 09:28:56 +01:00
jeremy@jermolene.com
6207ec4812
Merge branch 'master' into parameterised-transclusions
2022-08-02 17:49:28 +01:00
jeremy@jermolene.com
0366d6d7ba
Merge branch 'master' into parameterised-transclusions
2022-07-21 10:11:23 +01:00
jeremy@jermolene.com
b1cf9f241e
Merge branch 'master' into parameterised-transclusions
2022-07-21 10:10:49 +01:00
jeremy@jermolene.com
17c9bf7546
Protect against excessively recursive functions
2022-07-21 09:17:57 +01:00
jeremy@jermolene.com
745707fea3
Parameters widget: Be defensive about negative depths
2022-07-19 10:27:36 +01:00
jeremy@jermolene.com
d4e0eb193b
Slot widget: be more defensive about negative depth values
2022-07-19 10:26:20 +01:00
jeremy@jermolene.com
a2182255cc
Simplify the fill widget
...
We can rely on the default processing in the base class
2022-07-19 10:02:09 +01:00
jeremy@jermolene.com
7d90083d14
Docs: Transclude widget
2022-07-18 19:44:53 +01:00
jeremy@jermolene.com
30f7b37cba
Make use of type attribute consistent
2022-07-18 19:44:37 +01:00
jeremy@jermolene.com
189fe428b7
Merge branch 'master' into parameterised-transclusions
2022-07-04 21:15:42 +01:00
jeremy@jermolene.com
945c9e619a
Merge branch 'master' into parameterised-transclusions
2022-06-22 08:51:46 +01:00
jeremy@jermolene.com
6e1138e504
Merge branch 'master' into parameterised-transclusions
2022-06-17 16:40:54 +01:00
jeremy@jermolene.com
cdf5d7bd4a
Fix new selection tracker to return relative coordinates
2022-06-16 17:00:20 +01:00
jeremy@jermolene.com
05d2c029a4
Merge branch 'master' into parameterised-transclusions
2022-06-14 08:34:47 +01:00
jeremy@jermolene.com
4e6efed58f
Revert "Fix #6721 "
...
This reverts commit b216579255 which was committed to the wrong branch
2022-06-14 08:34:42 +01:00
Jeremy Ruston
b216579255
Fix #6721
2022-06-13 15:43:28 +00:00
jeremy@jermolene.com
3e33d309ed
Docs: format:json
...
Also tweak to the behaviour of format:json if the input string is not valid JSON
2022-06-11 17:29:20 +01:00
jeremy@jermolene.com
688c3bc5f6
Docs: JSON operators and tweaks to genesis widget
2022-06-11 15:22:43 +01:00
jeremy@jermolene.com
227079f3da
Add format:json operator
...
I've been finding this useful for debugging, and it kind of goes with the JSON operators
2022-06-10 09:29:56 +01:00
jeremy@jermolene.com
79b20bdaa8
Fix up handling of slot/fill for custom widgets
...
Previously we were wrapping the body in an implicit `<$fill $name="ts-body">` widget
2022-06-09 18:02:47 +01:00
jeremy@jermolene.com
defe3e42e6
Adjust naming of transclusion metaparameter
2022-06-05 16:10:41 +01:00
jeremy@jermolene.com
7680280d87
Fix typo
2022-06-05 15:59:03 +01:00
jeremy@jermolene.com
542df63ccf
Simplify metaparameters implementation
2022-06-03 11:21:32 +01:00
jeremy@jermolene.com
b57a6da548
Mark docs as v5.3.0
2022-06-03 09:22:19 +01:00
jeremy@jermolene.com
c42df2233a
Make slot fill data available to transclusions
...
Allows transcluded content to dynamically process <$fill> widgets within the calling transclusion
2022-06-03 08:53:51 +01:00
jeremy@jermolene.com
139047b4f8
Typo from f513b403fe
2022-06-01 10:06:27 +01:00
jeremy@jermolene.com
f513b403fe
Remove support for $:/tags/Global
...
It is not needed now that we have true global variables
2022-06-01 08:24:20 +01:00
jeremy@jermolene.com
613f4af20f
Fix refreshing of global variables
...
Global variables access within attributes will automatically trigger a refresh if the attribute text changes, but that wasn't happening for transclusions.
2022-05-31 09:19:01 +01:00
jeremy@jermolene.com
006ae6e759
Refactor $parameters widget
...
The objective is to add a $depth attribute so that it is possible to reach up to retrieve the parameters of ancestor transclusions. However, doing so requires changing the encoding of parameter names so that it is not possible for a user parameter to clash with an attribute like $depth. So now we have to double up dollars on any attribute names seen by the parameters widget, just like with the transclude widget itself.
2022-05-31 09:03:20 +01:00
jeremy@jermolene.com
150266c731
Use underscores for new system fields for global variable tiddlers
...
For consistency with `_canonical_uri`; unlike many system fields, the behaviour of these fields is baked into the core JS code.
2022-05-30 18:38:25 +01:00
jeremy@jermolene.com
3af2cc2691
Introduce function operator for calling functions
...
Can invoke any functions, not just those start with a period. And can pass zero parameters (in contrast when invoked as a custom filter operator there's no way to omit the first parameter).
2022-05-30 18:05:54 +01:00
jeremy@jermolene.com
bd9d7c3d6a
Clean up unknown filter
2022-05-30 18:04:37 +01:00
jeremy@jermolene.com
0c3f82855b
Minor cleanups
2022-05-29 10:55:15 +01:00
jeremy@jermolene.com
8106ad390d
Merge branch 'master' into parameterised-transclusions
2022-05-29 10:52:45 +01:00
jeremy@jermolene.com
9424e9d1f2
Cleaning up after f636349007
2022-05-28 17:32:09 +01:00
jeremy@jermolene.com
f803e00567
Test showing how to un-override a core widget
2022-05-28 16:58:20 +01:00
jeremy@jermolene.com
58f01c9a20
Fix tabs global so it doesn't crash when viewed directly
2022-05-28 13:50:08 +01:00
jeremy@jermolene.com
5d413d3e2d
Change to ? for conditional definitions
2022-05-28 13:49:02 +01:00
jeremy@jermolene.com
0d78b3fa38
Convert the tabs macro into a global
...
So far it appears to be totally backwards compatible... In practice, I think maybe this and the conversion of the other macros should go into a separate subsequent PR.
2022-05-28 12:24:48 +01:00
jeremy@jermolene.com
f636349007
Introduce true global variables
...
The basic idea is that if we don't find a variable `foo` then we fallback to retrieving the value from the tiddler `$:/global/foo`, if it exists.
This allows us to replace the usual importvariables-based mechanism for global definitions, avoiding cluttering up the variable namespace with every macro.
In order to permit subprocedures to be overridden, we also introduce a mechanism for conditional definitions: preceding the word definition|procedure|function|widget with a + causes the definition only to occur if the specified variable doesn't already exist. In the next commit we'll apply this mechanism to the tabs macro
2022-05-28 12:23:50 +01:00
jeremy@jermolene.com
a2fbebf509
Add utility function for parsing macro parameter definitions
2022-05-27 18:37:42 +01:00
jeremy@jermolene.com
7fc65d0d1a
Remove accidental commit 6cc99fcbe3
2022-05-27 08:36:31 +01:00
jeremy@jermolene.com
6f9f92fa69
Add support for $:/tags/Global
2022-05-26 21:11:53 +01:00
jeremy@jermolene.com
dec45f0fc3
Fix importvariables to work with setvariables as well as set (they are aliases)
2022-05-26 21:11:32 +01:00
jeremy@jermolene.com
45b7b4bc6d
Make is[variable] and variables[] operators resilient to fake widgets
2022-05-26 08:23:54 +01:00
jeremy@jermolene.com
e2d45e176a
Merge branch 'master' into parameterised-transclusions
2022-05-25 18:08:17 +01:00
jeremy@jermolene.com
0e08150028
Remove unneeded test tiddler
2022-05-25 18:04:32 +01:00
jeremy@jermolene.com
d59eec74a8
Merge branch 'master' into parameterised-transclusions
2022-05-25 15:23:20 +01:00
jeremy@jermolene.com
6cc99fcbe3
WIP
2022-05-25 15:15:17 +01:00
jeremy@jermolene.com
cbce4ebb7b
Allow custom functions to be invoked as attributes
2022-05-23 20:18:54 +01:00
jeremy@jermolene.com
9e8d05f699
Require period prefix for custom filter operator functions
...
To ensure that custom filter operators cannot clash with future core operators.
2022-05-23 16:40:21 +01:00
jeremy@jermolene.com
3e09eacd20
Missed off 22e7ec2381
2022-05-23 16:32:19 +01:00
jeremy@jermolene.com
22e7ec2381
Procedures and widgets inherit whitespace trim setting from their definition
2022-05-23 15:30:33 +01:00
jeremy@jermolene.com
170c4b1799
Merge branch 'master' into parameterised-transclusions
2022-05-23 11:28:12 +01:00
jeremy@jermolene.com
d11893752c
Experimental update of the parse-tree preview visualisation
...
An experiment to try out using the new JSON operators for rendering the JSON parse tree that we get back from the wikify widget.
As usual with these experiments, this one is going to require quite a lot more work to finish up:
* The formatting is via direct styles rather than classes
* The formatting for attributes and properties is not yet completed
* The same thing needs to also be done to the widget tree preview
2022-05-23 10:24:51 +01:00
jeremy@jermolene.com
ec1ec8ccd8
Fix invocation of JS macros
2022-05-21 16:31:34 +01:00
jeremy@jermolene.com
e50101322f
Require $$ for custom widgets, and that overridden JS widgets must exist
...
See https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1133637763
2022-05-21 15:47:19 +01:00
jeremy@jermolene.com
bbd9e2f243
Rename <$value> widget to <$fill>
2022-05-13 09:18:25 +01:00
jeremy@jermolene.com
36cf50aa96
Use \widget for custom widget definitions, and remove need for angle brackets
...
Need to do some refactoring of all those isFunctionDefinition/isProcedureDefinition/isWidgetDefinition flags into a single property
2022-05-13 08:49:53 +01:00
jeremy@jermolene.com
904e30a0e2
Detect recursion by tracking widget tree depth
...
The old recursion marker approach was very slow, and didn't catch test cases like editions/test/tiddlers/tests/data/transclude/Recursion.tid
2022-05-12 16:26:33 +01:00
jeremy@jermolene.com
413dc86d05
Rename internal "unknown" filter operator so that users cannot invoke it
2022-05-11 14:52:25 +01:00
jeremy@jermolene.com
774459fa73
Transclude: replace paramNames/paramValues with more robust JSON payload
...
More details at https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1123719153
2022-05-11 13:51:11 +01:00
jeremy@jermolene.com
a827290332
Fix stringifying/parsing string arrays containing newlines
...
A very old bug.
Fixes the ActionListOpsWidget problem @btheado
2022-05-10 10:22:35 +01:00
jeremy@jermolene.com
0b11b499c2
Better backwards compatibility for legacy recursion marker
...
Fixes the problem with tag dropdowns @btheado
2022-05-10 10:21:56 +01:00
jeremy@jermolene.com
eef7d180a5
Remove obsolete code
...
Left over after refactoring
2022-05-10 10:21:19 +01:00
jeremy@jermolene.com
8e4c13382b
Fix visible transclusion example
2022-05-10 08:10:32 +01:00
jeremy@jermolene.com
e092113f9f
Switch to using \procedure to define new-style macros, and \function for custom filter operator functions
...
I now need to update the OP!
2022-05-09 18:00:09 +01:00
jeremy@jermolene.com
64448ae774
Make the macrocall widget delegate to the transclude widget
2022-05-08 20:48:33 +01:00
jeremy@jermolene.com
4f2f689ab9
Clarify that the recent changes allow functions to be invoked with the double bracket syntax
...
In other words, the transclude widget distinguishes between functions and macros and handles the parameters appropriately
2022-05-08 16:05:32 +01:00
jeremy@jermolene.com
e9630328f1
Extend transclude widget to work with old-style macros and use it for the macrocall shortcut syntax
2022-05-08 15:59:20 +01:00
jeremy@jermolene.com
9be05f6f38
Use consistent parse tree node property for params
2022-05-07 13:22:53 +01:00
jeremy@jermolene.com
2fe2d20ddf
Genesis widget should pass raw attributes onto child widget...
...
...so that it can more efficiently handle refreshing itself.
2022-05-07 11:41:28 +01:00
jeremy@jermolene.com
c5b10d5c1d
Add visible transclusions component and demo
...
Very useful to see transclusions explicitly
Makes a good demo of a super-complicated widget override.
2022-05-06 15:39:45 +01:00
jeremy@jermolene.com
e01dfa1507
Experimental support for custom filter operators
...
Just as we can define custom widgets we can also define custom parameterised filter operators
2022-05-06 15:01:17 +01:00
jeremy@jermolene.com
a9938a6c67
Improve recursion detection
...
While retaining backwards compatibility
2022-05-06 15:00:10 +01:00
jeremy@jermolene.com
7caaf82571
Fix variable retrieval bug with test harness
2022-05-06 10:32:20 +01:00
jeremy@jermolene.com
e5164113c4
Don't create variables with value undefined for missing parameters
2022-05-05 14:47:22 +01:00
jeremy@jermolene.com
7ead87bd29
Use enlist:raw to preserve duplicates
2022-05-05 11:34:30 +01:00
jeremy@jermolene.com
f56e316c86
Fix genesis widget example
2022-05-05 11:34:06 +01:00
jeremy@jermolene.com
ea51b8a3fe
Merge branch 'master' into parameterised-transclusions
2022-05-05 08:30:48 +01:00
jeremy@jermolene.com
f307f00e32
Fixes to enable the transclude widget itself to be overridden
...
There are two big changes here:
Replace the previous "ts-wrapper" mechanism, which we had been using to redefine custom widgets inside their definitions to prevent recursive calls. Now we've got the genesis widget we can instead control recursion through a new "$remappable" attribute that allows the custom widget mechanism to be skipped.
We also extend the slot widget to allow a depth to be specified; it then reaches up by the indicated number of transclusion widgets to find the one from which it should retrieve the slot value.
2022-05-05 08:20:14 +01:00
jeremy@jermolene.com
35430d09ed
Fix bug with empty strings ignored in $tw.utils.stringifyList/parseStringArray
...
I will pull this out into a separate PR. Fixing it doesn't cause problems for the core but I imagine it might cause issues for 3rd party code.
2022-05-05 08:16:20 +01:00
jeremy@jermolene.com
e99137f4cc
Cache parse trees when transcluding variables
2022-05-03 17:59:45 +01:00
jeremy@jermolene.com
719a5614cb
Change tiddler separator used in wikitext tests
...
Underscore looked ambiguous; I kept typing dashes by accident
2022-05-03 16:53:00 +01:00
jeremy@jermolene.com
56c2242e4e
Introduce genesis widget for dynamically creating widgets
...
See the "RedefineLet" test for a contrived example of usage
2022-05-03 12:55:10 +01:00
jeremy@jermolene.com
e1df50d981
Fix parameter handling
2022-05-03 12:54:29 +01:00
jeremy@jermolene.com
c4743ebbec
Fix importing of function definitions
2022-05-03 09:39:05 +01:00
jeremy@jermolene.com
8f69c27632
Reuse attribute objects when executing custom widgets
2022-05-03 09:38:41 +01:00
jeremy@jermolene.com
0163c04b7d
Fix addAttributeToParseTreeNode handling of ordered attributes
2022-05-03 09:37:49 +01:00
jeremy@jermolene.com
2ea0374b55
Allow the let widget to create variables starting with $
2022-05-03 08:44:33 +01:00
jeremy@jermolene.com
3000d3339c
Remove extraneous code
2022-05-03 08:11:00 +01:00
jeremy@jermolene.com
a888cd57cd
Unquoted parameters should not eat a succeeding comma
...
Fixes #6672
2022-05-02 13:49:41 +01:00
jeremy@jermolene.com
a10106a4a6
Fix crash when transcluding an undefined variable
...
Thanks @pmario
See https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1114692359
2022-05-02 11:15:18 +01:00
jeremy@jermolene.com
fbd0357cae
Mustn't allow commas in parameter names
2022-05-02 11:04:32 +01:00
jeremy@jermolene.com
689a6c5b6a
Rewrite some tests to use the shortcut syntaxes
2022-05-02 10:56:22 +01:00
jeremy@jermolene.com
ea7199600d
Be as permissive as possible with parameter names
...
Previously restricted to upper and lower case, digits and dash and underscore
2022-05-02 10:56:09 +01:00
jeremy@jermolene.com
5f02cc49fd
Add support for accessing function parameters as name/value pairs
2022-05-02 10:00:50 +01:00
jeremy@jermolene.com
bbc6661192
Remove erroneous "tag" property
2022-05-02 09:26:18 +01:00
jeremy@jermolene.com
8b867be8ef
Add pragma rule for parameters declarations
2022-05-02 09:15:45 +01:00
jeremy@jermolene.com
99750d78b5
Allow brackets to be omitted for function definitions with no parameters
2022-04-30 13:06:28 +01:00
jeremy@jermolene.com
c9bd1b5274
Add wikitext shortcut for new-style function definitions
2022-04-30 12:44:26 +01:00
jeremy@jermolene.com
886c8620f5
Replace ubertransclude widget with transclude widget
2022-04-30 10:00:38 +01:00
jeremy@jermolene.com
aac2d6ccb0
Refactor ubertransclude functionality into transclude widget
2022-04-30 09:54:55 +01:00
jeremy@jermolene.com
c4991fff9e
Refactor transclude widget before uberfying it
2022-04-30 09:30:25 +01:00
jeremy@jermolene.com
f78e1f6f7d
Importvariables should skip parameters widgets
2022-04-29 22:36:07 +01:00
jeremy@jermolene.com
5bcf7b9edd
Add support for shortcut syntax for positional transclusion parameters
2022-04-29 22:35:47 +01:00
jeremy@jermolene.com
89b7a3bd28
Ubertransclusion positional parameters should be based on name, not position
2022-04-29 16:28:03 +01:00
jeremy@jermolene.com
9713da5071
Add support for positional parameters
2022-04-26 21:55:43 +01:00
jeremy@jermolene.com
31c3abb7ab
Add a definition for the value widget just so that it doesn't cause errors
...
Of course, it doesn't actually need to be a JS widget, it could be a wikitext widget...
2022-04-26 14:36:05 +01:00
jeremy@jermolene.com
a401732995
Use ts- prefix for system slot names
2022-04-26 14:27:28 +01:00
jeremy@jermolene.com
fae038dcbc
Remove need to explicitly clear widget mapping variable when invoking overridden widget
2022-04-26 14:24:31 +01:00
jeremy@jermolene.com
35616a0b39
Don't worry about ordered attributes
...
The changes in 0bffae2108 mean that we don't need to explicitly maintain the ordered attributes
2022-04-26 14:05:56 +01:00
jeremy@jermolene.com
7299d4fd1d
Merge branch 'master' into parameterised-transclusions
2022-04-26 14:03:03 +01:00
jeremy@jermolene.com
66d4b07f7e
Add a test for custom action widgets
2022-04-26 13:05:44 +01:00
jeremy@jermolene.com
0e4e037bb7
Changed transclude widget in binary parser to ubertransclude
2022-04-26 13:05:31 +01:00
jeremy@jermolene.com
cd0617f033
Use the ubertransclude widget for the wikitext transclusion syntax
2022-04-26 12:45:05 +01:00
jeremy@jermolene.com
05b582a202
Fix and test missing target handling
2022-04-26 12:32:46 +01:00
jeremy@jermolene.com
54b48876f7
Fix test execution
2022-04-26 12:32:34 +01:00
jeremy@jermolene.com
21b10a225f
Initial commit
...
Everything is draft.
2022-04-24 21:24:38 +01:00