1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Macro: remove confusing advice

See https://talk.tiddlywiki.org/t/wikitext-parsing-and-rendering-in-macros/2218
This commit is contained in:
jeremy@jermolene.com 2022-01-28 11:24:06 +00:00
parent da7cf7a4f3
commit f4365e4bb4

View File

@ -1,5 +1,5 @@
created: 20140211171341271
modified: 20200103092706002
modified: 20220128112317724
tags: Concepts Reference
title: Macros
type: text/vnd.tiddlywiki
@ -14,8 +14,6 @@ They are created using the `\define` [[pragma|Pragma]]. (Behind the scenes, this
The snippet and its incoming parameter values are treated as simple strings of characters with no WikiText meaning, at least until the placeholders have been filled in and the macro call has returned. This means that a macro can assemble and return the complete syntax of a ~WikiText component, such as a [[link|Linking in WikiText]]. (See [[Transclusion and Substitution]] for further discussion of this.)
The string returned by a macro call is parsed separately from any surrounding ~WikiText components. So a safe way to insert a special character sequence (such as `[[` or `<`) without triggering its normal ~WikiText meaning is to wrap it in a macro.
Within a snippet itself, the only markup detected is `$name$` (a placeholder for a macro parameter) and `$(name)$` (a placeholder for a [[variable|Variables]]).
The <<.mlink dumpvariables>> macro lists all variables (including macros) that are available at that position in the widget tree.