mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 08:10:45 +00:00
fix(core): 🐛 check for mw-heading wrapper first before mw-parser-output
The current implementation will fail with the new mw-heading wrapper
This commit is contained in:
parent
9cba4f5a63
commit
672740a23a
|
@ -230,16 +230,14 @@ final class BodyContent extends Partial {
|
|||
|
||||
$parentClasses = DOMCompat::getClassList( $parent );
|
||||
|
||||
// Only target page headings, but not other heading tags
|
||||
// TODO: Drop this when T13555 is deployed on LTS
|
||||
if ( !$parentClasses->contains( 'mw-parser-output' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Use the `<div class="mw-heading">` wrapper if it is present. When they are required
|
||||
// (T13555), the querySelectorAll() above can use the class and this can be removed.
|
||||
if ( $parentClasses->contains( 'mw-heading' ) ) {
|
||||
$el = $parent;
|
||||
} else if ( !$parentClasses->contains( 'mw-parser-output' ) ) {
|
||||
// Only target page headings, but not other heading tags
|
||||
// TODO: Drop this when T13555 is deployed on LTS
|
||||
continue;
|
||||
}
|
||||
|
||||
// This check can be removed too when we require the wrappers.
|
||||
|
|
Loading…
Reference in a new issue