Skip to content

Commit

Permalink
Merge pull request #2651 from opral/nilsjacobsen/inweb-73-convert-all…
Browse files Browse the repository at this point in the history
…-inlang-links-to-paths-without-the-domain-in-the

feat: replace https://inlang.com in all links with ""
  • Loading branch information
NilsJacobsen authored Apr 25, 2024
2 parents 167bd1e + 08418d1 commit f5fa5d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inlang/source-code/markdown/src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" &&
Expand Down

0 comments on commit f5fa5d4

Please sign in to comment.