User:Ohconfucius/script/formatgeneral.js: Difference between revisions

Content deleted Content added
tweak for separator to limit false positives
No edit summary
Line 666:
regex(/({{) ?(url) ?(?=\|)/gi, '$1$2');
regex(/({{url\|)[ ]*https?:\/\/(?:www\.|)([^\}]+}})[ ]*(?=[\n\r])/gi, '$1$2');
regex(/((?:homepage|website)[ ]*=)[ ]*https?:\/\/(?:www\.|)([^\s\[\]]+)(?=[\s])/gi, '$1{{url|$2}}');
regex(/((?:homepage|website)[ ]*=)[ ]*\[https?:\/\/(?:www\.|)([^\s\[\]]+) official (?:web|)site\](?=[\s])/gi, '$1{{url|$2}}');
regex(/({{url\|)([^\}]+)\|\2}}(?=[\s])/gi, '$1$2}}');