Wikipedia:AutoEd/whitespace.js: Difference between revisions
Content deleted Content added
Plastikspork (talk | contribs) This should work to prevent insertion of space between * and : in indented bullet comments |
Plastikspork (talk | contribs) Commenting one of the more aggressive whitespace removers, and modifying the heading whitespace code (per multiple requests on my talk page) |
||
Line 12:
str = str.replace(/^ ? ? \n/gm, "\n");
str = str.replace(/\n\n\*/g, "\n*");
str = str.replace(/([=\n]\n)\n+/g, "$1");
str = str.replace(/ \n/g, "\n");
Line 21:
//==Headings==
str = str.replace(/^(={1,4} )[
str = str.replace(/^(={1,4})([^= ][^=]*[^= ])[ ]+(={1,4})$/gm, "$1$2$3");
str = str.replace(/^(={1,4})[ ]+([^= ][^=]*[^= ])(={1,4})$/gm, "$1$2$3");
return str;
}
|