📎 Enable _blank target on all markdown links.

This commit is contained in:
Andrey Antukh 2021-11-11 11:31:27 +01:00
parent 1fffc1e828
commit 3c39661174
4 changed files with 104 additions and 87 deletions

View file

@ -25,6 +25,18 @@ paths.resources = "./resources/";
paths.output = "./resources/public/";
paths.dist = "./target/dist/";
/***********************************************
* Marked Extensions
***********************************************/
const renderer = {
link(href, title, text) {
const escapedText = l.escape(text);
return `<a href="${href}" target="_blank">${escapedText}</a>`;
}
};
marked.use({renderer});
/***********************************************
* Helpers