Hi all,
I'm having a strange problem trying to render HTML with the Node --render command. As the subject says, the output of global macros doesn't show up. Yet local macros work fine. Am I doing something wrong, or is this a bug or just not supported this way? The documentation doesn't say anything about lack of support, and I would not expect content to be completely dropped from the rendered output without warning.
Here's a minimal test case:
created: 20200510013858423
modified: 20200510013929749
tags: $:/tags/Macro
title: testmacro
type: text/vnd.tiddlywiki
\define myglobalmacro() Some more nice text.
created: 20200510013706375
modified: 20200510013934876
tags:
title: test2
type: text/vnd.tiddlywiki
\define mymacro() Hello world!
<<mymacro>>
<<myglobalmacro>>
Signing off.
Within my wiki, as expected, this tiddler renders as:
<div class="tc-tiddler-body tc-reveal"><p>Hello world!</p><p>Some more nice text.</p><p>Signing off.</p></div>
On the other hand, when I run:
"$(npm bin)/tiddlywiki" --render '[[test2]]' "[is[tiddler]addsuffix[.html]]"
...in output/test2.html, I get merely:
<p>Hello world!</p><p>Signing off.</p>
My first thought was that TiddlyWiki filtered out the tiddler containing the macro, so it didn't know how to do the replacement. But then I tried:
"$(npm bin)/tiddlywiki" --render '[is[tiddler]]' "[is[tiddler]addsuffix[.html]]"
...and that didn't work either.
Any idea how I can get all my macros replaced properly? I'm actually trying to extract just the rendered portions of one global macro from my wiki this way, so having it skip rendering exactly the only part I care about is pretty ironic!