Skip to content

Commit

Permalink
fix(images): fix url for relative url images when they start with "/"
Browse files Browse the repository at this point in the history
  • Loading branch information
wallpants committed May 20, 2024
1 parent 850cf70 commit 7133c3a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ export function fixLocalImageHref(
return href;
}

// TODO: do we need this?
if (href.startsWith("/")) {
// the URL is from root
return href;
return relativeImageUrlPrefix + href.slice(1);
}

try {
Expand Down

0 comments on commit 7133c3a

Please sign in to comment.