Skip to content

Commit fe5e6b2

Browse files
Handle relative link without ./
1 parent 37d1cc1 commit fe5e6b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/MarkdownLink.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export function MarkdownLink({
2828
hrefWithoutMd = hrefWithoutMd.replace(/^\.\.\//gm, '../../')
2929
} else if (hrefWithoutMd.startsWith('./')) {
3030
hrefWithoutMd = hrefWithoutMd.replace(/^\.\//gm, '../')
31+
} else {
32+
hrefWithoutMd = `../${hrefWithoutMd}`
3133
}
3234

3335
return (

0 commit comments

Comments
 (0)