User:DemonDays64/Scripts/Dumb quotes.js: Difference between revisions

Content deleted Content added
Minor reorganization
Implement negative lookbehind for File: without a closing ]] to avoid changing file links per Keith D request (see User talk:DemonDays64#Dumb Quotes; will test in-browser but in Regexr it seems good)
Line 51:
modifiedPage = pageBeforeEdit;
 
makeAndRunRegex(/(?<!File:[^\]]*[^\]]*)(‘|’)/g, "'");
makeAndRunRegex(/(?<!File:[^\]]*[^\]]*)(“|”)/g, '"');
doEdit();
setEditSummary("Replaced curly quotes with straight with [[User:DemonDays64/Scripts/Dumb quotes.js|script]] per [[MOS:CQ]].", true);