Page MenuHomePhabricator

action=parse does not regognise {{subst:}}
Closed, DeclinedPublic

Description

Author: conrad.irwin

Description:
To my mind, {{fr}} and {{subst:fr}} should both give the same output when rendered, but they don't:

http://en.wiktionary.org/w/api.php?action=parse&text={{fr}}{{subst:fr}}

Gives

<p>French{{subst:fr}}</p>

instead of

<p>FrenchFrench</p>


Version: unspecified
Severity: enhancement

Details

Reference
bz19098

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:42 PM
bzimport set Reference to bz19098.

matthew.britton wrote:

Substitution is handled by pre-save transform. To include that in parsing, use "pst" parameter.

http://en.wiktionary.org/w/api.php?action=parse&text={{fr}}{{subst:fr}}&pst

<p>FrenchFrench</p>

conrad.irwin wrote:

Thanks, have added this to the documentation.

  • <code>pst</code>: Do a pre-save-transform (makes <nowiki>{{subst:}}</nowiki> work properly)