Page MenuHomePhabricator

Let us talk parser hooks!
Closed, ResolvedPublic


There are a bunch of extensions that rely on parser hooks to plug into the parsing pipeline. This page has information about extensions that are deployed on the Wikimedia cluster that use various parser hooks. However, these hooks are not replicable in parsers that don't have the same pipeline as the PHP parser. For example, Parsoid processes wikitext differently.

As we work towards unifying the two parser implementations, this is something we should tackle. Our plan on the Parsing Team is to design a new parser hooks API that is internals-agnostic so that they can be supported in Parsoid, the PHP parser (or potentially some other parser someone might write in the future). We have a bunch of ideas around this. But, there is nothing well-formed or coherent beyond a bunch of ideas. What better avenue than a hackathon to start talk about this.

This phabricator ticket is for a brainstorming and discussion session to talk parser hooks and a new design for that. We especially welcome developers who have worked on extensions that rely on parser hooks.