Last modified: 2011-04-14 15:12:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T25138, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23138 - Create a flag to setFunctionHook to force the parser not to parse parameters
Create a flag to setFunctionHook to force the parser not to parse parameters
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-10 12:43 UTC by Svip
Modified: 2011-04-14 15:12 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Svip 2010-04-10 12:43:45 UTC
In certain cases it will be useful if the parser does not parse the parameters of parser functions elements.

Example:
{{#example:1|{{a}}|3}}

Would contain the values of '1', '{{a}}' and '3' rather than whatever {{a}} must have parsed to for the second element.

I refer especially in consideration to the NaturalLanguageList extension (http://www.mediawiki.org/wiki/Extension:NaturalLanguageList) I am working on.

For instance, right now this is not really possible:

{{#list:format={{a|$1}}|blanks=true|0| |2|3| |5}}

Assuming if {{a}} was '''{{{1|nothing set}}}''', and its end result would simply be:

'''0''', '''''', '''2''', '''3''', '''''' and '''5'''

Since the format={{a|$1}} had already been parsed into '''$1''', since '$1' is not blank to the parser, and so 'nothing set' will never ever occur.

Instead it should be possible to set a flag on the setFunctionHook to say that the elements should not be parsed, but rather be parsed upon request, e.g.

$parser->parseThis(element);

So the extension can decide which to be parsed where and when or if at all.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links