Skip to content

Commit

Permalink
Merge branch 'normalizeRoutePath' into route-link
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Apr 17, 2024
2 parents f3690b8 + cddd691 commit 0f82b53
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 180 deletions.
2 changes: 1 addition & 1 deletion packages/shared/src/utils/index.ts
Expand Up @@ -2,11 +2,11 @@ export * from './dedupeHead.js'
export * from './ensureLeadingSlash.js'
export * from './ensureEndingSlash.js'
export * from './formatDateString.js'
export * from './inferRoutePath.js'
export * from './isLinkExternal.js'
export * from './isLinkHttp.js'
export * from './isLinkWithProtocol.js'
export * from './isPlainObject.js'
export * from './inferRoutePath.js'
export * from './normalizeRoutePath.js'
export * from './omit.js'
export * from './removeEndingSlash.js'
Expand Down
3 changes: 3 additions & 0 deletions packages/shared/src/utils/inferRoutePath.ts
@@ -1,3 +1,6 @@
/**
* Infer route path according to the given (markdown file) path
*/
export const inferRoutePath = (path: string): string => {
// if the pathname is empty or ends with `/`, return as is
if (!path || path.endsWith('/')) return path
Expand Down

0 comments on commit 0f82b53

Please sign in to comment.