MediaWiki Weirdness: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 31: | Line 31: | ||
<code><nowiki><nowiki />{{#invoke:module|func}}</nowiki></code> | <code><nowiki><nowiki />{{#invoke:module|func}}</nowiki></code> | ||
[[Category:Article]] | [[Category:MediaWiki]] [[Category:Article]] |
Latest revision as of 19:41, 25 October 2017
Introduction
I spent hours trying to debug some strange behaviour in MediaWiki and thought the solution, which I got from someone on IRC, might be beneficial to others.
When using a template, which invokes a LUA module, an additional line is added before the output. Turns out a bug T14974 has been filed a while back, but it looks like there's no desire to fix it.
Example
Invoking the module directly works as intended:
{{#invoke:module|func|...}}
Output here.
But when using a template, which calls the module, an additional line is prepended:
{{template_which_invokes_module|...}}
Output here.
Solution
In the template, add <nowiki />
before invoking the module:
<nowiki />{{#invoke:module|func}}