Help:Lint errors/template-arg-in-extension-tag
| MediaWiki version: | 1.46 |
This page is about Linter error template-arg-in-extension-tag.
An extension tag with template parameter occurs when there is on the page tag with syntax <tagname>...</tagname> and within is used template parameter (etc. {{{1|One}}}).
In this scenario, template parameter will not be transcluded and original wikitext will show instead.
With the former syntax, the indicator arguments are evaluated lazily and within Parsoid (by which time Parsoid no longer has access to the parent frame).
With the latter syntax, the indicator arguments are evaluated eagerly and in this case, Parsoid asks the core parser to handle the expansion for it which is how it works right now.
There are no current plans to change how Parsoid handles template parameters inside <tagname>...</tagname> tags.
This is a rare use case, and the reliable {{#tag:...}} form is already available.
Suggested fixes
[edit]For these types of extension tag with template parameters, it is recommended to replace original tag syntax with {{#tag:tagname|...}} syntax.
For example:
<!-- FROM -->
<poem>
One,
{{{2|Two.}}}
</poem>
<!-- TO -->
{{#tag:poem|
One,
{{{2|Two.}}}
}}
Editors have sometimes used <poem>...</poem> tags in combination with <code>...</code> and <nowiki>...</nowiki> to show code snippets.
Those tags can be replaced with <syntaxhighlight>...</syntaxhighlight>.
For guidance on the syntax of the <imagemap>...</imagemap> tag, see Extension:ImageMap.
Where editors have used <gallery>...</gallery> to display images with text on their User pages, parameter names and braces can usually be replaced by the default parameter value, since the pages are not transcluded.