fix: fix bug with relative link

This commit is contained in:
jinhojang6 2024-10-11 02:35:42 +09:00
parent 59b424a92d
commit 2fa764ca92
No known key found for this signature in database
GPG Key ID: 1762F21FE8B543F8

View File

@ -123,6 +123,9 @@ function updateMarkdownLinksToExcludeMD(content) {
return match
}
// replace ../../ with /
p2 = p2.replace(/\.\.\/\.\.\//g, '/')
let url = p2.replace(/\.md$/, '') // Remove .md extension from URL
let anchor = p3.replace(/^\//, '') // Remove preceding '/' from anchor if exists