Page MenuHomePhabricator

Temporarily generate new Parser Function markup for all parser functions
Closed, ResolvedPublic

Description

This is to unblock early development on VisualEditor support for wikifunctions, by allowing parsoid to generate "real looking" markup for the new parser function.

The basic idea is to match the proposal in T373253#10278573 by:

That would let you write {{#anything}} on your local wiki and get parsoid markup which should generate the right markup to trigger your VE code. In particular, adding a ParserFirstCallInit handler to your LocalSettings.php which did:

$parser->addFunctionHook('function', static function($parser, ...$args) { return "placeholder" });

ought to be sufficient to generate the "correct" output markup for {{#function:1|2|3}} and thereby unblock work on VisualEditor support for this markup.

This is *not intended to be production-ready* code. This changes the markup for *all* parser functions, which would not be a safe thing to enable on production wikis. This is just a development tool, to bridge the gap while we write the "real" Parsoid registration/etc support.

Event Timeline

Change #1115132 had a related patch set uploaded (by C. Scott Ananian; author: Subramanya Sastry):

[mediawiki/services/parsoid@master] WIP: Quick wip providing experimental parser function output

https://gerrit.wikimedia.org/r/1115132

Change #1115126 had a related patch set uploaded (by C. Scott Ananian; author: Subramanya Sastry):

[mediawiki/core@master] Introduce ParsoidExperimentalParserFunctionOutput config flag

https://gerrit.wikimedia.org/r/1115126

Change #1115126 merged by jenkins-bot:

[mediawiki/core@master] Introduce ParsoidExperimentalParserFunctionOutput config flag

https://gerrit.wikimedia.org/r/1115126

Change #1115132 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Add experimental v3 parser function output for use by wikifunctions

https://gerrit.wikimedia.org/r/1115132

Change #1118559 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.21.0-a15

https://gerrit.wikimedia.org/r/1118559

Change #1118559 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.21.0-a15

https://gerrit.wikimedia.org/r/1118559