simplify references
parent
a5a144a92c
commit
8e996071d1
|
@ -80,11 +80,14 @@ module.exports = {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// removes inline links
|
// removes inline links and refs
|
||||||
if (!links) {
|
if (!links) {
|
||||||
data = data.replaceAll(/([^!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g,
|
data = data.replaceAll(/([^!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g,
|
||||||
(match, prefix, title) => prefix+'*'+title+'*'
|
(match, prefix, title) => prefix+'*'+title+'*'
|
||||||
);
|
);
|
||||||
|
data = data.replaceAll(/\*\\\[([^\\]+)\\\]\*/g,
|
||||||
|
(match, ref) => '['+ref+']'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
Loading…
Reference in New Issue