Page MenuHomePhabricator

Parsoid shouldn't wrap wikitext html-ish `<hX>` tags in <section> wrappers
Open, HighPublic

Description

Event Timeline

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

[mediawiki/services/parsoid@master] [WIP] Meh

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

MSantos triaged this task as High priority.Mar 5 2026, 3:22 PM

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

[mediawiki/core@master] [OTP] Continue to mark html headings with a class

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

Change #1260830 merged by jenkins-bot:

[mediawiki/core@master] [OTP] Continue to mark html headings with a class

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

Change #1244822 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Html headings aren't section wrapped

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

Change #1264672 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a24

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

Change #1264672 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a24

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

I think this might need a small follow up for h1s.

We said this elsewhere but just so that it's recorded here too, the current definition of an html heading requires that it be given attributes in the source. That's from the limitation described in T417531

Ultimately, we'd like to say that if you're using html syntax for headings, regardless of attributes, then they don't get section wrapping, section edit links, aren't included in the TOC.  The patch we deployed is a first step to see how feasible that is