Page MenuHomePhabricator

Raw text arguments; FragmentHandler interface should expose extension tags as strip markers
Open, Needs TriagePublic

Description

The markerSkipCallback mechanism in core skips extension tags, since they are represented as strip marker. So, for example:

{{#uc:some <nowiki>thing</nowiki>}}

renders as "SOME thing", without uppercasing inside the extension tag.

In order to make this work properly, our DataAccess::preprocess() method should probably return a new ExtensionTagPFragment type, which we can recognize and either skip or convert back to wikitext.

This will also allow the KeyValuePairPFragment::toRawText() method to work better, since it will be able to recognize a <nowiki> in the argument.

Similarly, any parsoid-implemented parser functions are left unexpanded by the core preprocessor. Perhaps core needs to return some sort of ParserFunctionPFragment type as well so that these can then be expanded by Parsoid somehow.

Event Timeline

cscott renamed this task from FragmentHandler interface should expose extension tags as strip markers to Raw text arguments; FragmentHandler interface should expose extension tags as strip markers.Mar 29 2025, 2:35 AM

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

[mediawiki/services/parsoid@master] WIP: Add ExtensionTagPFragment type

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

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

[mediawiki/services/parsoid@master] Update newly-passing tests after core ExtensionTagPFragment support

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

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

[mediawiki/core@master] WIP: Use ExtensionTagPFragment to pass back extension tag content

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

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

[mediawiki/services/parsoid@master] WIP: PreprocExpander

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