jeremy@jermolene.com
81002f9f30
Merge branch 'master' into parameterised-transclusions
2023-01-17 16:40:47 +00:00
Saq Imtiaz
dd6e00687b
Adds support for indenting pragmas with whitespace ( #7185 )
...
* feat: first pass at allowing pragmas to be indented
* Added documentation
2023-01-08 13:17:01 +00:00
jeremy@jermolene.com
778b8dec7f
Merge branch 'master' into parameterised-transclusions
2022-11-23 09:01:42 +00:00
Jeremy Ruston
cb0d0cfa6d
Support nested macro definitions ( #7004 )
...
* First commit
* Switched to \end <name> instead of all those repeated backslashes
Thanks @kookma. See https://github.com/Jermolene/TiddlyWiki5/pull/7004#issuecomment-1286429236
* Docs update
2022-11-22 17:10:37 +00: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
9424e9d1f2
Cleaning up after f636349007
2022-05-28 17:32:09 +01:00
jeremy@jermolene.com
5d413d3e2d
Change to ?
for conditional definitions
2022-05-28 13:49:02 +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
Jermolene
35cbb127a3
Restrict variable substitutions to macros defined with the define pragma
...
Fixes #3333
2018-06-15 08:31:02 +01:00
Tobias Beer
b9299309cc
Fixes #2076 single line macros shouldn't need terminating line break
2016-10-08 13:44:30 +01:00
Jermolene
b0cb17cd83
Re-establish caching of results of parsing a tiddler
...
I switched this optimisation off back in
ed35d91be6
, in October 2013, as part of a
big refactoring of the parsing and widget mechanism. I’ve been meaning
to switch it back on for some time.
My rough measurements suggest that this optimisation can reduce
rendering time by 5-10%.
2015-07-05 17:48:18 +01:00
Jermolene
93cb03eeab
Allow whitespace after \end in macro definitions
...
Fixes #1090
2014-11-18 10:26:20 +00:00
Jermolene
43aeb47fc3
Skip whitespace from start of inline macro definitions
...
Now `\define mymacro() yes` will not have a leading space in the
variable value
2014-08-28 20:21:09 +01:00
Jermolene
b2e1dd2138
Allow whitespace after first line of multiline macro
...
Fixes the remaining part of #482
2014-08-11 13:52:10 +01:00
Jermolene
5260899d8b
Relax requirement for newline after macro definition
2014-08-07 16:00:20 +01:00
buggyj
a2ec4c55e3
added triple double-quotes delimiters for marco/widget parameters (to support json strings)
2014-06-19 07:29:14 +02:00
Jeremy Ruston
f496cd540e
Store macros in the render context so that they scope in the expected way
2012-12-29 23:17:09 +00:00
Jeremy Ruston
27ccb581be
Don't trim macro definition bodies
2012-12-29 22:27:51 +00:00
Jeremy Ruston
0e418f6e8d
Fix the macro definition regexp
2012-12-26 19:33:11 +00:00
Jeremy Ruston
982b6a8773
Switch code block syntax
2012-12-22 23:09:44 +00:00
Jeremy Ruston
094f8c32ca
Finishing moving the parser rules about
2012-12-20 16:41:06 +00:00
Jeremy Ruston
54423e599c
Moving the wikiparser rules around
2012-12-20 16:38:33 +00:00