[Migrated] Fix unbalanced brackets inside gallery
Open, Needs TriagePublic


<gallery>[[File:foo.jpg</gallery> → <gallery>File:foo.jpg</gallery> [[https://en.wikipedia.org/w/index.php?title=Geography_of_Saint_Kitts_and_Nevis&diff=520233843&oldid=520088437 Example]] @Magioladitis 08:09, 28 October 2012 (UTC)

Reguyla updated the task description. (Show Details)
Reguyla raised the priority of this task from to Needs Triage.
Reguyla added a project: AutoWikiBrowser.
Reguyla moved this task to General fixes on the AutoWikiBrowser board.

@TMg 12:43, 11 May 2014 (UTC) wrote:

I just added these two regex to my tool. They are applied only to the contents of gallery tags.

  1. Replace: '^(\\s*)\\[+([^[\\]]*)\\]\\]?\s*$' (RegexOptions.Multiline) with '$1$2'
  2. Replace: '^(\\s*)\\[+' (RegexOptions.Multiline) with '$1'

This is my test case:


Expected result: