MediaWiki:Gadget-libExtraUtil.js: Difference between revisions

Content deleted Content added
add notice for unit tests to initial comment
Version 2.3.0: Unlink: mark the unlinked term for list items which are marked for manual review
Line 24:
// <nowiki>
 
window.extraJs = { version: '2.23.20' };
 
/* ========== Polyfills to support IE11 and Edge<14 ============================================= */
Line 766:
}
// Mark any other list items with backlinks for manual review, using {{subst:void}}
var manual_review_regex = new RegExp(
'^(\\*+.*)(?:' + simple_regex_str + '|' +
simple_regex_str.replace(/([^\\])\(([^?])/g, "$1(?:$2") + // replace capturing groups with non-capturing groups
named_regex_str + ').*$', 'gm' );
'|' +
wikitext = wikitext.replace(manual_review_regex, '{{subst:void}}$&');
named_regex_str.replace(/([^\\])\(([^?])/g, "$1(?:$2") + // replace capturing groups with non-capturing groups
named_regex_str + ')(.*)$', 'gm' );
wikitext = wikitext.replace(manual_review_regex, '{{subst:void}}$&1{{subst:^|<strong>}}$2{{subst:^|</strong>}}$3');
 
// For all other links, replace with unlinked text