User:Ohconfucius/test/Sources subscript1.js: Difference between revisions

Content deleted Content added
Fixes suggested by User:GoingBatty
Tag: Reverted
add a negation for open string
Tag: Reverted
Line 1,363:
// source names to 'wikiname' - unlinked, unitalicised; outside citation templates (non-italicising)
var re = new RegExp('(<ref[^>]*>[^<\\{]+?[-\\]\\.},;–]\\s+)(?:\\w+\\.|)' + word + '(?: newspaper| online| website|)((?:[,\\.]?[^\\w\' ][^\\]<]*?|)<\\/ref>)', 'gi');
regex(re, newWord2);
// source names to 'wikiname' - unlinked; outside citation templates (deitalicising)
var re = new RegExp('(<ref[^>]*>[^<\\{]+?\\s+)\'\'(?:\\w+\\.|)' + word + '(?: newspaper| online| website|)\'\'([^<]*?<\\/ref>)', 'gi');
regex(re, newWord2);
// source names to unitalicised 'wikiname' - linked, unpiped; outside citation templates
var re = new RegExp('(<ref[^>]*>[^<\\{]+?[-\\]\\.},;–]\\s+\\[\\[)(?:\\w+\\.|)' + word + '(?: newspaper| online| website|)(\\]\\][^<]*?<\\/ref>)', 'gi');
regex(re, newWord2);
// source names to 'wikiname' - linked, unpiped; outside citation templates(deitalicising)
var re = new RegExp('(<ref[^>]*>[^<\\{]+?[-\\]\\.},;–]\\s+)\'\'\\[\\[(?:\\w+\\.|)' + word + '(?: newspaper| online| website|)\\]\\]\'\'([^<]*?<\\/ref>)', 'gi');
regex(re, newWord3); //NOTE: adaptation to re-link is built into 'newWord3'
}