TiddlyWiki / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
8k stars 1.18k forks source link

[BUG] Wikitext Macros #8391

Open kookma opened 2 months ago

kookma commented 2 months ago

Describe the bug

Open https://tiddlywiki.com/#%24%3A%2Feditions%2Ftw5.com%2Fwikitext-macros

See


\procedure tw-code(tiddler)
<$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/>
\end

\procedure tw-code-link(tiddler)
[[$tiddler$]]:
<<tw-code $tiddler$>>
\end

I think text substitution is not correct here

Expected behavior

The correct form should be

\procedure tw-code(tiddler)
<$codeblock language={{{ [<tiddler>get[type]] }}} code={{{ [<tiddler>get[text]] }}}/>
\end

\procedure tw-code-link(tiddler)
<$link to=<<tiddler>>/>:
<$transclude $variable=tw-code tiddler=<<tiddler>> />
\end

To Reproduce

No response

Screenshots

No response

TiddlyWiki Configuration

Additional context

No response

kookma commented 2 months ago

As this is an issue with docs I submitted a PR here: https://github.com/jermolene/TiddlyWiki5/pull/8390