Jump to content
Wikipedia The Free Encyclopedia

Wikipedia:AutoEd/extrabreaks.js

From Wikipedia, the free encyclopedia
 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 item
 str=str.replace(/[\t ]*<[\s\/\.]*br[\s\/\.]*>[\t ]*([\s]*?[\n]\*)/gim,'1ドル');
 //BR tag followed by at least two newlines
 str=str.replace(/[\t ]*<[\s\/\.]*br[\s\/\.]*>[\t ]*([\n])[\t ]*([\n])/gim,'1ドル2ドル');

 returnstr;
 }

AltStyle によって変換されたページ (->オリジナル) /