Page MenuHomePhabricator

Pipe trick should work with colon functions
Closed, ResolvedPublic

Description

Author: wikipedia01

Description:
[[{{lc:ABC}}|]]
doesn't work while
[[{{lc:ABC}}|{{lc:ABC}}]]
and
[[{{subst:lc:ABC}}|]]
work.


Version: unspecified
Severity: enhancement

Details

Reference
bz8785

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:32 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz8785.
bzimport added a subscriber: Unknown Object (MLST).

ayg wrote:

What's the desired output? [[{{lc:Bob (person)}}|]] -> [[{{lc:Bob (person)}}|{{lc:Bob}}]]?
That kind of thing would require a good bit of special-casing in the pre-save transform,
because it would have to distinguish from things like [[{{#expr:5*(2+3)}}|]] -/>
[[{{#expr:5*(2+3)}}|{{#expr:5*}}]].

The problem is that the 'pipe trick' is implemented only at edit save time, not
at link rendering time; so rendering transformations (templates, functions etc)
don't have the expected effect.

wikipedia01 wrote:

(In reply to comment #1)

What's the desired output? [[{{lc:Bob (person)}}|]] -> [[{{lc:Bob

(person)}}|{{lc:Bob}}]]?

That kind of thing would require a good bit of special-casing in the pre-save

transform,

because it would have to distinguish from things like [[{{#expr:5*(2+3)}}|]] -/>
[[{{#expr:5*(2+3)}}|{{#expr:5*}}]].

[[{{subst:lc:Bob (person)}}|]] becomes [[bob (person)|bob]], same as [[{{lc:Bob
(person)}}|{{lc:Bob}}]].
[[{{subst:#expr:5* (2+3)}}|]] becomes [[25|25]], same as [[{{#expr:5*
(2+3)}}|{{#expr:5* (2+3)}}]].

The distingish of them is the result of {{}} makes _() or not.

  • Bug 11049 has been marked as a duplicate of this bug. ***

conrad.irwin wrote:

Fixed in r62069