remove wikipedia edit this link
parent
0910c5c18f
commit
877bd0d840
|
@ -19,7 +19,8 @@ module.exports = {
|
||||||
/\*\*\[\^\]\(#cite_ref[^\)]+\)\*\*/g,
|
/\*\*\[\^\]\(#cite_ref[^\)]+\)\*\*/g,
|
||||||
/(?:\\\[)?\[edit\]\([^\s]+\s+"[^"]+"\)(?:\\\])?/ig,
|
/(?:\\\[)?\[edit\]\([^\s]+\s+"[^"]+"\)(?:\\\])?/ig,
|
||||||
/\^\s\[Jump up to[^\)]*\)/ig,
|
/\^\s\[Jump up to[^\)]*\)/ig,
|
||||||
/\[[^\]]*\]\(#cite_ref[^\)]+\)/g
|
/\[[^\]]*\]\(#cite_ref[^\)]+\)/g,
|
||||||
|
/\[\!\[Edit this at Wikidata\].*/g
|
||||||
],
|
],
|
||||||
replace: [
|
replace: [
|
||||||
{
|
{
|
||||||
|
@ -82,7 +83,7 @@ module.exports = {
|
||||||
|
|
||||||
// removes inline links and refs
|
// removes inline links and refs
|
||||||
if (!links) {
|
if (!links) {
|
||||||
data = data.replaceAll(/([^!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g, '$1$2');
|
data = data.replaceAll(/([^\!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g, '$1$2');
|
||||||
data = data.replaceAll(/[\\\[]+([0-9]+)[\\\]]+/g, '[$1]');
|
data = data.replaceAll(/[\\\[]+([0-9]+)[\\\]]+/g, '[$1]');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue