When <<mac1>>
occurs in wikitext, it’s content is first inserted into the wikitext, and then the wikitext is parsed/rendered. Thus, because mac1
is defined as
<$let fldnameprefix="ok">yes</$let>
the wikitext
ii-<<mac1>>-ii
is expanded to
ii-<$let fldnameprefix="ok">yes</$let>-ii
which is then “wikified” (parsed/rendered) as
ii-yes-ii
However, when <mac1>
occurs in a filter
pp-{{{ [<mac1>match[yes]then[matched]] }}}-pp
is expanded to
pp-{{{ [[<$let fldnameprefix="ok">yes</$let>]match[yes]then[matched]] }}}-pp
but literal filter values are NOT automatically wikified, but are instead just used as-is… and thus the <mac1>
macro output does not match yes
, so the filter result is null and “matched” is not displayed.
To use the rendered output of the macro within the filter syntax, you can first use the $wikify
widget to convert the macro output, like this:
<$wikify name="mac1" text=<<mac1>>>
pp-{{{ [<mac1>match[yes]then[matched]] }}}-pp <br>
</$wikify>
hope this helps,
-e