On 11-01-31 09:36 AM, Platonides wrote:
> Daniel Friesen wrote:
>> setHook (old style tag hooks), and setFunctionTagHook (new style function 
>> tag hooks).
>>
>> setHook and setFunctionTagHook both set<tag>  style hooks. Originally we
>> just had setHook, it had one short argument list. Later on that argument
>> list was changed to add $frame to it. the newer setFunctionTagHook uses
>> a different argument order, which appears to be the same set of
>> arguments, just the first two and last two seam to be flipped.
>
>> I'm not exactly sure of the difference, but setFunctionTagHook definitely 
>> exists because
>> of preprocessor improvements and because applying the new parsing
>> behaviors to setHook would result in different behavior for tags or code
>> bugs... perhaps attr="{{{1}}}"'s are expanded in setFunctionTagHook's
>> because they are parsed by the preprocessor.
> setFunctionTagHook was added so that you could expand variables inside
> tags. Then setHook() got added $frame and the need for such hook type
> disappeared. I'd like to kill it, although it has been there for some
> time (if any list reader uses it, please stand up).
>
>
>
>> or what the setFunctionHook style $flags are for
> It's unused.
>
>
>> The primary difference is that setHook<tag>  hooks are parsed in an old
>> style, iirc pre-1.12 style. setFunctionTagHook are parsed by the
>> preprocessor that parses parser functions, the contents aren't
>> preprocessed but it's still parsed by the preprocessor.
> The preprocessor doesn't mind about it. The preprocessor makes one block
> with everything between<tags>  whereas it enters into braces blocks. No
> matter which kind of function tag is done, the extension itself need to
> recursiveTagParse it.
I think there's a little more difference between setHook and 
setFunctionTagHook than you mention.
At the very least, extensionSubstitution outputs a function tag hook 
directly, while putting a normal tag hook into the general strip state 
and outputting a marker.

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]


-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]


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

Reply via email to