diff --git a/frontend/scripts/_helpers.js b/frontend/scripts/_helpers.js
index 5df2acf0d..7602b9c14 100644
--- a/frontend/scripts/_helpers.js
+++ b/frontend/scripts/_helpers.js
@@ -237,18 +237,29 @@ async function renderTemplate(path, context = {}, partials = {}) {
return mustache.render(content, context, partials);
}
-const extension = {
- useNewRenderer: true,
+const markedOptions = {
renderer: {
link(token) {
- const href = token.href;
- const text = token.text;
- return `${text}`;
- },
- },
-};
+ if (token.href === "mailto") {
+ return `${token.text}`;
+ } else {
+ let target = "_blank";
-marked.use(extension);
+ if (token.text.endsWith("|target:self")) {
+ const index = token.text.indexOf("|target:self");
+ token.text = token.text.substring(0, index);
+ target = "_self";
+ }
+
+ const href = token.href;
+ const text = token.text;
+ return `${text}`;
+ }
+ }
+ }
+}
+
+marked.use(markedOptions);
async function readTranslations() {
const langs = [
diff --git a/manage.sh b/manage.sh
index 6d508922e..4e8e8374d 100755
--- a/manage.sh
+++ b/manage.sh
@@ -120,7 +120,6 @@ function run-devenv-isolated-shell {
$DEVENV_IMGNAME:latest sudo -EH -u penpot bash
}
-
function build {
echo ">> build start: $1"
local version=$(print-current-version);