Skip to content

Commit 3533160

Browse files
committed
Merge branch 'auto-link' into route-option
2 parents 7bb763a + c4eff84 commit 3533160

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/client/src/components/RouteLink.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { removeLeadingSlash } from '@vuepress/shared'
21
import { computed, defineComponent, h } from 'vue'
32
import type { SlotsType, VNode } from 'vue'
43
import { useRoute, useRouter } from 'vue-router'
@@ -92,7 +91,7 @@ export const RouteLink = defineComponent({
9291
const path = computed(() =>
9392
props.to.startsWith('#') || props.to.startsWith('?')
9493
? props.to
95-
: `${__VUEPRESS_BASE__}${removeLeadingSlash(resolveRoutePath(props.to, route.path))}`,
94+
: `${__VUEPRESS_BASE__}${resolveRoutePath(props.to, route.path).substring(1)}`,
9695
)
9796

9897
return () =>

packages/shared/src/utils/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export * from './isLinkExternal.js'
77
export * from './isLinkHttp.js'
88
export * from './isLinkWithProtocol.js'
99
export * from './isPlainObject.js'
10-
export * from './inferRoutePath.js'
1110
export * from './normalizeRoutePath.js'
1211
export * from './omit.js'
1312
export * from './removeEndingSlash.js'

0 commit comments

Comments
 (0)