Last modified: 2009-06-29 13:58:49 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 T10314, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8314 - Pass parameters to parser functions without evaluating them
Pass parameters to parser functions without evaluating them
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 9439 (view as bug list)
Depends on:
Blocks:
  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: ---


Attachments

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.


Navigation
Links