Wikipedia:AutoEd/extrabreaks.js
Appearance
//
function autoEdExtraBreaks(str) { //MAIN FUNCTION describes list of fixes
//Remove extra BR tags
str = str.replace(/<br>\]\]|<br\/>\]\]|<br \/>\]\]/gi, '\]\]'); //Remove usually unneeded BR tags from ends of image descriptions and wikilinks
str = str.replace(/<br>\}\}|<br\/>\}\}|<br \/>\}\}/gi, '\}\}'); //Remove usually unneeded BR tags from ends of templates
str = str.replace(/<br>\||<br\/>\||<br \/>\|/gi, '\}\}'); //Remove from parameters
str = str.replace(/<br> \||<br\/> \||<br \/> \|/gi, '\}\}'); //Ditto
str = str.replace(/\|\n<br>|\|\n<br\/>|\|\n<br \/>/gi, '\}\}'); //Ditto
return str;
}
//