English Wikipedia @ Freddythechick:AutoEd/links.js

This is the current revision of this page, as edited by imported>Pppery at 21:32, 25 January 2024 (Pppery changed the content model of the page Wikipedia:AutoEd/links.js from "wikitext" to "JavaScript"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
function autoEdLinks(str) { //MAIN FUNCTION describes list of fixes

    str = str.replace(/\]\[/g, "] [");

    //repair bad external links
    str = str.replace(/\[?\[http:\/\/([^\]\n]*?)\]\]?/gi, "[http://$1]");
    //str = str.replace(/\[http:\/\/([^\]]*?)\|([^\]]*?)\]/gi, "[http://$1 $2]");

    return str;
}