From 08418d115c20bea203f92bae985217e16d869968 Mon Sep 17 00:00:00 2001 From: Nils Jacobsen Date: Thu, 25 Apr 2024 11:43:48 +0200 Subject: [PATCH] feat: replace https://inlang.com in all links with "" --- inlang/source-code/markdown/src/convert.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inlang/source-code/markdown/src/convert.ts b/inlang/source-code/markdown/src/convert.ts index e2d1b48b59..5257846e0f 100644 --- a/inlang/source-code/markdown/src/convert.ts +++ b/inlang/source-code/markdown/src/convert.ts @@ -213,7 +213,9 @@ export async function convert(markdown: string): Promise<{ data: any; html: stri node.properties.href.includes("inlang.com") && node.children[0].tagName !== "img" ) { - //node.properties.target = "_blank" + node.properties.href = node.properties.href + .replace("https://inlang.com", "") + .replace("http://inlang.com", "") } else if ( // external link with image (no arrow icon) node.tagName === "a" &&