User:Lwarrenwiki/formatgeneral.js: Difference between revisions

Content deleted Content added
created custom version of User:Ohconfucius/script/formatgeneral.js
 
No edit summary
Line 295:
// regex(/([\s>()])[“„«](\[?\w+)/gi, '$1\"$2');
// regex(/(\w+\]?\.?)[”»](\W)/gi, '$1\"$2');
 
regex(/(.)[‘`´’“”](.)/gi, '$1\'"$2'); // straight apostrophe (won't touch prime symbol here)quotes
regex(/(.)[‘`´’](.)/gi, '$1\'$2'); // straight apostrophe (won't touch prime symbol here)
regex(/(.)[“„”«»](.)/gi, '$1\"$2');
 
Line 301 ⟶ 304:
regex(/(\w)[‘`´’′](s|t)\b/gi, '$1\'$2'); // in-word replacement of various single quotes and prime symbol with straight apostrophe
 
regex(/(.)[‘`´’](.)/gi, '$1\'$2'); // straight apostrophe (won't touch prime symbol here)
regex(/([\w;,\]\)>] ) +([\[(]|[a-z\d])/gi, '$1$2'); //rem multiple spaces except when preceded by full stop; tweaked to not remove dbl spaces where preceded by new sentence (caps)
regex(/(^\.U\.)[ ]+((?:S|K)\.)/gi, '$1$2'); //U. S. and U. K. to U.S. and U.K.