Replies: 2 comments
-
Somewhat related, I have an open PR (#6361) which documents this behavior for |
Beta Was this translation helpful? Give feedback.
-
Hi @twMat I think you're asking to be able to use the textual substitution used for macro parameters within the scope of a widget that defines those variables, such as the list widget. The trouble is that textual substitution has to be performed on raw wiki text before it has been parsed. In your example, by the time the list widget has defined the value of the variable myvar its content has already been parsed, and it's too late to do the textual substitution. Quite possibly that doesn't make sense; I think that the broader problem is that implementing macro parameters via textual substitution was a mistake because it leads to the kinds of inconsistencies you've highlighted. |
Beta Was this translation helpful? Give feedback.
-
I wish it were possible to invoke variables or macros directly in "short form" transclusions, links and macrocalls (am I missing some "short form"?). This is a stumble for all newcomers, i.e they try
{{<<myvar>>}}
,[[label|<<myvar>>]]
etc - and why shouldn't they, it is the intuitive guess and it is simpler than the required full widget syntax.Here's an example of how it could look:
Obviously, the usual variable scopes are valid; a local variable definition takes precedence over the more more distant one.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions