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
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:
I did not understand this part.
What, in above, is a “literal filter value” ?
So is the filter trying to match "[<$let fldnameprefix="ok">yes</$let>]" with "yes" ?
When you say “NOT automatically wikified”, does it mean "[<$let fldnameprefix="ok">yes</$let>]" is not wikified because it occurs inside a filter ?
And the various documentations around seem to suggest that $wikify is “expensive” to use. So is there a better way to get the above done ?
That’s correct… and to be exact, the filter is trying to match “<$let fldnameprefix="ok">yes</$let>” with “yes”. The square brackets surrounding those values mean they are “literal filter values” as compared with angle brackets which indicate variable or macro references, or curly braces which indicate tiddler field references.
Processing a $wikify widget CAN be “expensive”, depending upon the content being wikified, and whether or not the $wikify widget occurs within the inner content of a $list widget (i.e., a repeating loop), where it will be invoked for each matching list item. If you are processing 1000s of list items, the overhead can add up. However, for simple uses, while its performance is not highly optimized, it’s also not particularly costly. I would say “go ahead and use it” and only look for alternatives if things start to take a long time to process.