Page MenuHomePhabricator

removeEmptySections function of cosmetic_changes.py sometimes removes large sections of a page
Closed, ResolvedPublic

Description

Originally reported by Hercule Antoine on the mailing list:

I have another problem with CC :
https://fr.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Le_Bistro/Articles_%C3%A0_cr%C3%A9er_en_2013&diff=prev&oldid=151563699

Some sections are removed but I don't see what is different from the others. It just appends when CC are on.

Event Timeline

Dalba renamed this task from removeEmptySections function of cosmetic_changes.py sometimes remove large sections of a page to removeEmptySections function of cosmetic_changes.py sometimes removes large sections of a page.Aug 23 2018, 2:25 PM
Dalba triaged this task as High priority.

Change 454853 had a related patch set uploaded (by Dalba; owner: dalba):
[pywikibot/core@master] CosmeticChangesToolkit.removeEmptySections: Do not skip interwikis

https://gerrit.wikimedia.org/r/454853

I managed to minimize the issue to the following input:

text [[:en:link]]
=== title1 ===
content1

The diff after applying cosmetic changes:

@@ -2,2 +1,0 @@
- === title1 ===
- content1

Change 454853 merged by jenkins-bot:
[pywikibot/core@master] CosmeticChangesToolkit.removeEmptySections: Fix skipping of language links

https://gerrit.wikimedia.org/r/454853