Page MenuHomePhabricator

Parsoid-native {{DEFAULTSORT}} implementation would take precedence over [[Template:DEFAULTSORT]]
Open, Needs TriagePublic

Description

Parsoid's FragmentHandler interface uses the same API for both magic variables and zero-argument parser functions. For almost all magic variables this would be fine, but {{DEFAULTSORT}} is somewhat unique in being registered as a parser function but *not* as a magic variable. Thus {{DEFAULTSORT}} (with no colon) is parsed as a template invocation, not as a magic variable/zero arg parser function.

This will probably be a "known difference" between Parsoid and the legacy parser.

This is not an issue at the moment because we use the legacy parser's implementation of DEFAULTSORT; it would become an issue if Parsoid were to implement DEFAULTSORT natively.