mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
📎 Enable _blank target on all markdown links.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user