Page MenuHomePhabricator

problems with {{padleft:}} ({{padright:}}) and template arguments
Closed, ResolvedPublic

Description

Author: ss181292

Description:
Code:

{{padleft:{{{1}}}|10|X}}

should return:

XXX{{{1}}} (if first parameter of current template is not specified)

or for example:

XXXXXXX123 (if first parameter of current template is 123)

but now it returns:

XXX10

We have similar situation if we ask for second argument.


Version: unspecified
Severity: normal

Details

Reference
bz7651

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:24 PM
bzimport set Reference to bz7651.
bzimport added a subscriber: Unknown Object (MLST).

ssanbeg wrote:

When the parser function splits the arguments, it's clobbering its own arg list. Calling it as

{{padleft:{{{1}}}|10|X|1={{{1}}}}}

Should restore the clobbered arg you want, and give the expected result.

Basically the same issue as bug 5678.

rockmfr wrote:

Fixed in the new parser.