Page MenuHomePhabricator

AWB combining separate lists into one.
Closed, ResolvedPublic

Description

If there are multiple blank lines between two lists, per normal AWB operation, AWB removes the multiple lines. This causes the lists to become one list. One needs a minimum of two blank lines because just one blank line between list items means the items are part of one list. Unfortunately, it being two separate lists is a minority of cases, majority being the two blank lines should be removed. However, it is better to err on the safe side. This is also requested per part of my BRFA at [[Wikipedia:Bots/Requests for approval#BG19bot 9]]

Examples:
https://en.wikipedia.org/wiki/Transport_in_Bulgaria#Major_roads
https://en.wikipedia.org/wiki/User:Bgwhite/Sandbox1

Event Timeline

Bgwhite raised the priority of this task from to High.
Bgwhite updated the task description. (Show Details)
private static readonly Regex NewlinesWithinLists = new Regex(@"(\r\n\*.*)\r\n\r\n\*", RegexOptions.Compiled);

should fix this.

Moreover, I am pretty sure AutoEd removes ALL lines between. I switched from my conservative approach to the aggressive one after that observation to achieve greater AutoEd / AWB coordination.

Rjwilmsi claimed this task.
Rjwilmsi subscribed.

rev 11800

Found a glitch.

AWB messed up on [[Pope Martin IV]]. It removed double blank lines. Testing it in my sandbox, if I removed the URL (www.newadvent.org), then AWB won't remove the blank lines. Article text:

* Chouiller, Ernest, "Recherches sur la vie du pape Martin IV," ''Revue de Champagne et de Brie'' 4 (1878) 15-30.
* Picherit, Gilles, ''Documents pour l'histoire de Simon de Brion, pape Martin II dit IV., 1215-1285'' (Les Herbiers: chez l'Auteur 1995).
* Cerrini, Simonetta, "Martino IV," ''Enciclopedia dei papi'' (Roma 2000), I, 446-449.


*[http://www.newadvent.org/cathen/09724a.htm ''Catholic Encyclopedia''] "Pope Martin IV"
*[http://www.fiu.edu/~mirandas/consistories-xiii.htm Salvador Miranda, "The Cardinals of the Holy Roman Church":] Martin's seven cardinals