Skip to content

Commit

Permalink
fix regex
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Sep 11, 2024
1 parent 5d25d48 commit c6475ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/docs-bundle/src/utils/extractNextDataPathname.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/
export function extractNextDataPathname(pathname: string): string {
return (
pathname.match(/\/_next\/data\/.*\/_next\/data\/[^/]*(\/.*\.json).json/)?.[1] ??
pathname.match(/\/_next\/data\/[^/]*(\/.*\.json)/)?.[1] ??
pathname.match(/\/_next\/data\/.*\/_next\/data\/[^/]*(\/.*)\.json.json/)?.[1] ??
pathname.match(/\/_next\/data\/[^/]*(\/.*)\.json/)?.[1] ??
pathname
);
}

0 comments on commit c6475ca

Please sign in to comment.