regexp syntax
parent
8e996071d1
commit
805bcb92a2
|
@ -82,12 +82,8 @@ module.exports = {
|
||||||
|
|
||||||
// removes inline links and refs
|
// removes inline links and refs
|
||||||
if (!links) {
|
if (!links) {
|
||||||
data = data.replaceAll(/([^!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g,
|
data = data.replaceAll(/([^!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g, '$1*$2*');
|
||||||
(match, prefix, title) => prefix+'*'+title+'*'
|
data = data.replaceAll(/\*\\\[([^\\]+)\\\]\*/g, '[$1]');
|
||||||
);
|
|
||||||
data = data.replaceAll(/\*\\\[([^\\]+)\\\]\*/g,
|
|
||||||
(match, ref) => '['+ref+']'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
Loading…
Reference in New Issue