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