NOTE: Blocked on T334527
In a [previous edit](https://en.wiktionary.org/w/index.php?oldid=66915410#al%C4%B1r_almaz) of English Wiktionary's `Wiktionary:Requests for deletion/Non-English`, a header `alır almaz` had an unclosed `<s>` tag. The closing `</s>` was in the section contents.
In the Vector 2022 skin, the table of contents has this header with the tag closed as one would hope, but some extra `<s>` tags are also added after the header's list item, including one around the entire content area (`<s><div class="mw-content-container">...</div></s>`). So all the text of the page was stricken through and headers with `<s>` tags were doubly stricken through.
This doesn't happen in [Monobook](https://en.m.wiktionary.org/w/index.php?oldid=66915410#al%C4%B1r_almaz&useskin=monobook) or in the [mobile site](https://en.m.wiktionary.org/w/index.php?oldid=66915410#al%C4%B1r_almaz).
See also [this test edit](https://en.wiktionary.org/wiki/Special:Diff/66963448) in the sandbox.
It's debatable whether this is a bug as opposed to an expected result of bad HTML in the header. The naive HTML for the `alır almaz` header and section contents would be invalid (`<h2...>...<s>...</h2>...<dl>...<dt>...</s>...</dt>...</dl>`), but it is cleaned up by adding more `<s>` tags. But could Vector 2022 do the HTML cleanup for the table of contents in such a way that an unclosed tag in a header doesn't bleed through across the whole content area? Not sure exactly what that would look like. Not adding more instances of the unclosed tag outside the TOC maybe?
# Proposed solution
[] We'll add a linting rule to Parsoid that detects unclosed tags inside headings.
[] The rule should be hidden by default on https://en.wikipedia.org/wiki/Special:LintErrors but visible on https://en.wikipedia.org/wiki/Special:LintErrors/<lint key>
# Developer notes
Lints are essentially calls to recordLint inside the src/Wt2Html/PP/Processors/Linter.php class.
Once you implement code to recognize (and produce) a new lint record, you can test it via the "--linting" command line in Parsoid (bin/parse.php).
Recent commit introducing a linting rule; https://github.com/wikimedia/mediawiki-services-parsoid/commit/13e75de2723460c82067fe7036b3b49a07340535
# QA steps
[] Confirm the category doesn't show up on https://en.wikipedia.beta.wmflabs.org/wiki/Special:LintErrors
[] Confirm https://en.wikipedia.beta.wmflabs.org/wiki/Special:LintErrors/missing-end-tag-in-heading exists and lists pages with violations.
[] Create a new page which has a heading with an unclosed HTML tag e.g. `== <em>Foo ==` and check it shows up on the page.
# Sign off step
[] Make sure this is a task in the next sprint to make sure these are enabled and displayed in production.