Last modified: 2009-06-29 13:58:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8314 - Pass parameters to parser functions without evaluating them
Pass parameters to parser functions without evaluating them
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: 9439 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2006-12-19 06:01 UTC by Zoran Obradovic
Modified: 2009-06-29 13:58 UTC (History)
2 users (show)

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


Description Zoran Obradovic 2006-12-19 06:01:49 UTC
If I correctly understand how the parser works, parameters for parser functions
are parsed _before_ they are passed to parser function hooks. This seems awfully
wasteful, especially for #switch and different flavours of #if, where big chunks
of code, including metatemplates, are often parsed and thrown away. 

Parsing could be left up to the hook functions to do as needed, preferably with
a new way to set such hooks, so that the current extensions don't get broken.
Comment 1 Steve Sanbeg 2006-12-20 17:32:51 UTC
The simplest solution may be to add a magic word to defer parsing until later;
i.e.  {{#myfn:{{first}}|{{defer:second}}}} would parse first before the function
is called, and second after.

Although I'm not quite sure how to add a new magic word, I was able to test this
by recycling an existing magic word, and it seems to work.
Comment 2 Steve Sanbeg 2007-04-25 22:43:01 UTC
*** Bug 9439 has been marked as a duplicate of this bug. ***
Comment 3 Happy-melon 2009-06-29 13:58:49 UTC
This behaviour was totally changed when the new preprocessor was implemented in 2008.

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