wikimedia-gadgets / twinkle

The English Wikipedia twinkle javascript helper
http://en.wikipedia.org/wiki/Wikipedia:Twinkle
Other
138 stars 152 forks source link

warn: Inserting templates to wrong section if there are level 3 sections #1307

Closed Xi-Plus closed 3 years ago

Xi-Plus commented 3 years ago

If there are level 3 sections, Twinkle insert warning templates to wrong section. See https://en.wikipedia.org/w/index.php?title=User_talk%3AA2093064-test&oldid=1006550366 and previous edits.

https://github.com/wikimedia-gadgets/twinkle/blob/dc05676310d4f7a4376bd546274d33817ba99b41/modules/twinklewarn.js#L1768-L1769 I think it's required to get all sections instead of level 2 sections.

Related: #1084

Amorymeltzer commented 3 years ago

Good find, surprised this hasn't come up before!

Amorymeltzer commented 3 years ago

Noted in #1308, but in theory, if we a L3 within the dated L2, this will get posted at the bottom. It'll largely depend on how things are structured within the section(s), so I don't think we need to get too smart about that.