feat: Deal correctly in markdown with links that contain parenthesis.

This commit is contained in:
NunoSempere 2021-08-08 21:06:43 +02:00
parent 1980ac53e3
commit b8d2823d2b

View File

@ -4,7 +4,9 @@ import textVersion from "textversionjs"
/* Definitions */
var styleConfig = {
linkProcess: function(href, linkText){
return `[${linkText}](${href})`;
let newHref = href ? href.replace(/\(/g, "%28").replace(/\)/g, "%29") : ""
// Deal corretly in markdown with links that contain parenthesis
return `[${linkText}](${newHref})`;
},
}