Skip to content

Commit

Permalink
fix permissive regex (#9966)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtro committed May 9, 2024
1 parent 0f9bbae commit 28927ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const search = new SentryGlobalSearch([
]);

function relativizeUrl(url: string) {
return url.replace(/^.*:\/\/docs\.sentry\.io/, '');
return url.replace(/^(https?:\/\/docs\.sentry\.io)(?=\/|$)/, '');
}

type Props = {
Expand Down

0 comments on commit 28927ad

Please sign in to comment.