Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag: fix multiple issues grouping #2003

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TollensWP
Copy link

Fix #1997

Fix regression where section-specific tags were no longer ignored due to
a change in the HTML structure of article headings.
@siddharthvp
Copy link
Member

Can you elaborate how this fixes the issue?

@TollensWP
Copy link
Author

TollensWP commented Sep 21, 2024

Sure - the desired behaviour in the linked issue is already what Twinkle did until recently, when it broke due to a change in the way the HTML structure of articles changed. The code stops looking for new issue tags to include in the group after it reaches the first section heading, which were previously represented in the HTML as H2 tags at the same level as the rest of the page text. At some point this was changed and the actual header tag is wrapped in other elements, so because the parsing code is only looking at direct children of the container holding the page contents, it never saw any H2 tags and assumed the whole page was one big lead section. The outermost element that is still part of a section heading is tagged with the class .mw-heading, so looking for elements with that class accomplishes the same thing as looking for H2 tags used to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tag: when combining tags into {{Multiple issues}}, ignore all tags below the first ==Heading==
2 participants