fix(theme): fix parsing error for relative path link (#779)
This commit is contained in:
parent
9b2b73e05b
commit
07710247bb
@ -64,7 +64,8 @@ export function useLink(
|
||||
|
||||
// 判断是否为不存在的路由
|
||||
const routePath = link.split(/[?#]/)[0]
|
||||
const { notFound } = resolveRoute(routePath)
|
||||
const currentPath = page.value.filePathRelative ? `/${page.value.filePathRelative}` : undefined
|
||||
const { notFound } = resolveRoute(routePath, currentPath)
|
||||
|
||||
if (__VUEPRESS_DEV__)
|
||||
notFound && console.warn(`[VuePress Dead Link] "${toValue(href)}" is not found in (${page.value.filePathRelative || page.value.path})`)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user