mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 16:30:37 -05:00
🐛 Fix translate files generations with markdown and links
This commit is contained in:
parent
ba832389d1
commit
c89abf56ac
1 changed files with 9 additions and 4 deletions
|
@ -237,13 +237,18 @@ async function renderTemplate(path, context = {}, partials = {}) {
|
||||||
return mustache.render(content, context, partials);
|
return mustache.render(content, context, partials);
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderer = {
|
const extension = {
|
||||||
link(href, title, text) {
|
useNewRenderer: true,
|
||||||
|
renderer: {
|
||||||
|
link(token) {
|
||||||
|
const href = token.href;
|
||||||
|
const text = token.text;
|
||||||
return `<a href="${href}" target="_blank">${text}</a>`;
|
return `<a href="${href}" target="_blank">${text}</a>`;
|
||||||
},
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
marked.use({ renderer });
|
marked.use(extension);
|
||||||
|
|
||||||
async function readTranslations() {
|
async function readTranslations() {
|
||||||
const langs = [
|
const langs = [
|
||||||
|
|
Loading…
Reference in a new issue