Page MenuHomePhabricator

Remove duplicate section header
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):
When AWB genfixes encounter an empty section with a duplicate section header, delete the duplicate header.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • Load [[Charles Jacquin et Cie]] with genfixes
  • AWB finds an External links header followed immediately with another External links header
  • AWB marks the first section with the {{empty section}} template

Benefits (why should this be implemented?):
Removing the empty duplicate header would be more efficient than adding a maintenance tag that another editor has to resolve manually,

Event Timeline

@GoingBatty I believe you have access to a recent en-wiki database dump? If yes please run this as a multiline regex on mainspace, see what it finds: ^((={2,6}) *([^=\r\n<>]+) * \2)\s+\1

Should fine duplicated headers with only whitespace between. If you can tell me the matches then I'll check for any problems. If all good then I can add to genfixes.

@Rjwilmsi - I ran your regex against the database dump from Feb 1. Here are the matches I received:

  • Broomhill, County Armagh
  • Ten Sports
  • Astronaut ranks and positions
  • Nervilia concolor
  • Charles Jacquin et Cie
  • Super Singer 5
  • 1978–79 FC Basel season
  • Leucauge fastigata
  • 2023–24 Willem II season
  • 2024 Kentucky House of Representatives election
Rjwilmsi claimed this task.

rev 12935: FixHeadings to remove identical duplicated headings with only whitespace in between