Skip to content

Commit 0f82b53

Browse files
committed
Merge branch 'normalizeRoutePath' into route-link
2 parents f3690b8 + cddd691 commit 0f82b53

File tree

3 files changed

+180
-180
lines changed

3 files changed

+180
-180
lines changed

packages/shared/src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ export * from './dedupeHead.js'
22
export * from './ensureLeadingSlash.js'
33
export * from './ensureEndingSlash.js'
44
export * from './formatDateString.js'
5+
export * from './inferRoutePath.js'
56
export * from './isLinkExternal.js'
67
export * from './isLinkHttp.js'
78
export * from './isLinkWithProtocol.js'
89
export * from './isPlainObject.js'
9-
export * from './inferRoutePath.js'
1010
export * from './normalizeRoutePath.js'
1111
export * from './omit.js'
1212
export * from './removeEndingSlash.js'

packages/shared/src/utils/inferRoutePath.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Infer route path according to the given (markdown file) path
3+
*/
14
export const inferRoutePath = (path: string): string => {
25
// if the pathname is empty or ends with `/`, return as is
36
if (!path || path.endsWith('/')) return path

0 commit comments

Comments
 (0)