https://bugzilla.wikimedia.org/show_bug.cgi?id=23138

           Summary: Create a flag to setFunctionHook to force the parser
                    not to parse parameters
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Page rendering
        AssignedTo: [email protected]
        ReportedBy: [email protected]


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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to