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

warn: Fix bug in section insertion when non-L2 headings present #1308

Merged
merged 1 commit into from
Feb 13, 2021

Conversation

Amorymeltzer
Copy link
Collaborator

We were only counting L2 sections, so when there were non-L2 sections present, the section index would be wrong. Stems from introduction in #1084, closes #1307.

We were only counting L2 sections, so when there were non-L2 sections present, the section index would be wrong.  Stems from introduction in  wikimedia-gadgets#1084, closes wikimedia-gadgets#1307.
@Amorymeltzer
Copy link
Collaborator Author

@Xi-Plus This is untested since I'm not really around atm, but I think this should do it?

@Amorymeltzer
Copy link
Collaborator Author

Amorymeltzer commented Feb 13, 2021

Seems to work, although there's still an issue should there be a subsection within the dated L2; not sure what to do about that. Probably depends a lot on how things are structured within the section(s), so probably not worth touching. For now, though, I'll go ahead with this.

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.

warn: Inserting templates to wrong section if there are level 3 sections
1 participant