Wikipedia:AutoEd/whitespace.js: Difference between revisions

Content deleted Content added
Mark more
Move up
Line 13:
// Remove extra newlines
str = str.replace(/(\n\n)\n+/g, "$1");
str = str.replace(/(\n[\t ]*\n)(?:[\t ]*\n)+/g, "$1");
// Unmark
str = str.replace(/\uE000/g, '');
Line 23 ⟶ 24:
str = str.replace(/\n\n\*/g, "\n*");
// str = str.replace(/[ \t][ \t]+/g, " ");
str = str.replace(/(\n[\t ]*\n)(?:[\t ]*\n)+/g, "$1");
str = str.replace(/(=\n[\t ]*\n[\t ]*\n)(?:[\t ]*\n)+/g, "$1");
str = str.replace(/ \n/g, "\n");