Page MenuHomePhabricator

Parsoid and the core parser render headings preceded by behavior switches differently
Closed, ResolvedPublic

Description

The two parsers render

__NOINDEX__== Heading ==

differently. The core parser renders a heading, while Parsoid renders the raw wikitext (== Heading ==).

This syntax does exist in the wild; this bug report was prompted by a user on Discord asking why an SPI page looked weird in the mobile app.

This seems like the sort of thing that would have come up before, but I didn't see anything that looked the same in the "Known Differences" column.

Event Timeline

Arlolra triaged this task as Medium priority.Jan 16 2023, 5:35 PM
Arlolra moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.
Arlolra subscribed.

Hmm, elsewhere behaviour switches are considered SOL transparent,
https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/214300

And the grammar permits other SOL transparent constructs (comments, include tags) before headings,
https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/141887

This is probably just a bug.

Change 880553 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] [WIP] Treat behaviour switches as sol transparent in grammar

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

Change 880553 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Treat behaviour switches as sol transparent in grammar

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