functionautoEdExtraBreaks(str){//MAIN FUNCTION describes list of fixes//Usually unneeded BR tags from ends of image descriptions and wikilinks (]]), templates (}}), template parameters (|)str=str.replace(/[\t ]*<[\s\/\.]*br[\s\/\.]*>[\t ]*([\t\n ]*?)(\]\]|}}|\|)/gim,'$1$2');//BR tag before a list itemstr=str.replace(/[\t ]*<[\s\/\.]*br[\s\/\.]*>[\t ]*([\s]*?[\n]\*)/gim,'$1');//BR tag followed by at least two newlinesstr=str.replace(/[\t ]*<[\s\/\.]*br[\s\/\.]*>[\t ]*([\n])[\t ]*([\n])/gim,'$1$2');returnstr;}