Author: mrnobo1024
Description:
Templates inside template parameters, e.g. {{foo|{{bar}}}},
don't work, the parser sees the first }} as ending foo.
Version: 1.4.x
Severity: normal
• bzimport | |
Oct 8 2004, 2:33 AM |
F1318: tparam.diff | |
Nov 21 2014, 6:58 PM |
Author: mrnobo1024
Description:
Templates inside template parameters, e.g. {{foo|{{bar}}}},
don't work, the parser sees the first }} as ending foo.
Version: 1.4.x
Severity: normal
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T5931 "Templates used on this page" does not include the "nested templates" | |||
Resolved | None | T4376 [DO NOT USE] Template syntax (tracking) [superseded by #MediaWiki-Templates] | |||
Declined | None | T2662 Templates inside template parameters |
wmahan_04 wrote:
Templates within templates like {{foo{{bar}}}} don't work, either.
The regex that replaces templates doesn't balance the braces.
Before doing something like in the attached patch, we should
make sure:
code more complex
egil wrote:
Templates within template arguments are defintely useful. The more templates
like infoboxes that are created, the more useful this becomes. One example: A
template for geographical coordinates (generating an uniform look as well as a
link to a map) cannot be used in templates for geographical locations :(
If there is a problem with syntax/parsing, then perhaps we can some special ugly
syntax for this case. Since 3 brackets is already used for arguments, why not go
to 4?
E.g:
{{foo{{{{bar}}}}}}
egil wrote:
That said, I it seems strange from a syntax point of view why templates as
template arguments cannot be handled, when template arguments (which also
contain braces) can (for instance when using a template in another template
definition).
gangleri wrote:
In response to comment 0
Hallo!
The first }} should be seen as the end of the template started with the last {{.
Implementing this would solve bug 895 and would help for bug 2148.
Regards Reinhardt [[user:gangleri]]
Astronouth7303 wrote:
Probably related to this, "{{localurle:{{ns:4}}:Requested articles}}" don't work
under 1.5 (they did under 1.4).
The parser outputs "{{localurle:Astro73:Requested articles}}" (HTML) on my
private wiki (the meta namespace is "Astro73").
gangleri wrote:
testcase from http://eo.wikipedia.org/w/index.php?title=Ap%C5%9Deronsk&oldid=310604
{{Rusia urbo 2|Apsxeronsk||[[Krasnodara regiono]]|[[Apsxeronska distrikto de
Krasnodara regiono|Apsxeronska]]|[[1863]]|[[1947]]|{{Koordinatoj
gm|44|28|N|39|45|E}}|39,6 (2003)|03205501|86152|0}}
behaves differently then
the first example at http://test.leuksman.com/view/Ap%C5%9Deronsk
Note:
I will recommend the usage of distinct paramters for geographical coordinates
for this template at [[eo:]].
Regards Reinhardt [[user:gangleri]]
gangleri wrote:
changed to worksforme
http://yi.wiktionary.org/wiki/%D7%B0%D7%A2%D7%A8%D7%91
includes templates in templates at two levels
Thanks for fixing this. Best regards reinhardt [[user:gangleri]]