1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-04 00:56:17 +00:00
Commit Graph

20 Commits

Author SHA1 Message Date
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
977a133028 Tweak comments 2022-09-09 14:16:08 +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
22e7ec2381 Procedures and widgets inherit whitespace trim setting from their definition 2022-05-23 15:30:33 +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
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
9be05f6f38 Use consistent parse tree node property for params 2022-05-07 13:22:53 +01:00
jeremy@jermolene.com
c9bd1b5274 Add wikitext shortcut for new-style function definitions 2022-04-30 12:44:26 +01:00
Joe Bordes
82ec63e711
style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
Jermolene
35cbb127a3 Restrict variable substitutions to macros defined with the define pragma
Fixes #3333
2018-06-15 08:31:02 +01:00
Jermolene
0d354fe57f SetWidget: Add "subtiddler" attribute 2018-03-16 20:35:41 +00:00
Xavier Cazin
f78190ef61 Allow empty string as value parameter in SetWidget (#3164)
When occuring in a tiddler named "New Tiddler", the following construct should return ++ instead of +[[New Tiddler]]+

<$set name="myVariable" filter="[all[current]field:title[New Tiddler]]" value="">
+<<myVariable>>+
</$set>
2018-03-15 14:12:33 +00:00
Jermolene
5dd3d97760 Extend the set widget with tiddler, field and index attributes 2017-07-12 16:59:56 +01:00
Jermolene
b35544bf49 Extend set widget to support returning a single result from a filter
This solves the problem with extraneous double square brackets when
using the filtered set widget.
2016-10-18 09:16:47 +01:00
Tobias Beer
ea8a8f1b53 always set emptyValue, not just for filter 2015-12-09 23:33:07 +01:00
Tobias Beer
a1ce254e95 fixes #1937 — filter refresh in set widget
as per @EvanBalster
2015-09-21 17:24:26 +02:00
Jermolene
bd211ea082 Extend set variable widget to work with filters 2014-11-13 21:39:38 +00:00
Jermolene
939ad11eae Rename the 'setvariable' widget to 'set'
Sleeker.
2013-11-15 18:31:39 +00:00
Jeremy Ruston
b7cb1d3391 Change new_widget to widget
I was avoiding doing this until after the merge.
2013-11-08 08:47:00 +00:00
Jeremy Ruston
3e3a5917b7 Move the widgets back to the right folder 2013-11-08 08:38:44 +00:00