mirror of
https://github.com/penpot/penpot.git
synced 2025-08-02 15:08:34 +02:00
📎 Enable _blank target on all markdown links.
This commit is contained in:
parent
1fffc1e828
commit
3c39661174
4 changed files with 104 additions and 87 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue