Skip to content

Commit

Permalink
feat(shared): improve normalize path
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Nov 23, 2023
1 parent ab2c38b commit 56e1797
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/shared/src/client/utils/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const getHash = (path: string): string => {
export const normalizePath = (path: string): string =>
decodeURI(path)
.replace(HASH_REGEXP, "")
.replace(/(index)?\.(md|html)$/, "");
.replace(/(index)?\.html$/i, "")
.replace(/(README|index)?\.md$/i, "");

/**
* Whether the lick is active
Expand Down

0 comments on commit 56e1797

Please sign in to comment.