remove wikipedia edit this link

main
Lee Hanken 2022-04-02 14:26:44 +01:00
parent 0910c5c18f
commit 877bd0d840
1 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,8 @@ module.exports = {
/\*\*\[\^\]\(#cite_ref[^\)]+\)\*\*/g,
/(?:\\\[)?\[edit\]\([^\s]+\s+"[^"]+"\)(?:\\\])?/ig,
/\^\s\[Jump up to[^\)]*\)/ig,
/\[[^\]]*\]\(#cite_ref[^\)]+\)/g
/\[[^\]]*\]\(#cite_ref[^\)]+\)/g,
/\[\!\[Edit this at Wikidata\].*/g
],
replace: [
{
@ -82,7 +83,7 @@ module.exports = {
// removes inline links and refs
if (!links) {
data = data.replaceAll(/([^!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g, '$1$2');
data = data.replaceAll(/([^\!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g, '$1$2');
data = data.replaceAll(/[\\\[]+([0-9]+)[\\\]]+/g, '[$1]');
}