Skip to content

Commit

Permalink
fix: Escape underscores in links (#4797)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Jun 27, 2024
1 parent 2a5ba52 commit 8af6f35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/BaseMarkdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const markdown = computed(() => {
}
body = body.replace(/!\[.*?\]\((ipfs:\/\/[a-zA-Z0-9]+?)\)/g, replaceIpfsUrl);
// if body contains a link that contain `_` , replace it with `\_` to escape it
body = body.replace(/(http.*?)(?=_)/g, '$1\\');
return remarkable.render(body);
});
Expand Down

0 comments on commit 8af6f35

Please sign in to comment.