Skip to content

Commit

Permalink
fix: use decodeURIComponent
Browse files Browse the repository at this point in the history
related: #61 (comment)
  • Loading branch information
scarf005 committed Aug 26, 2024
1 parent 62d18dc commit a4dd70c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function shortenRepoUrl(href, currentUrl = 'https://github.com') {
searchParams,
hash,
} = url;
const pathname = decodeURIComponent(punycode.toUnicode(url.pathname));
const pathname = decodeURIComponent(url.pathname);

const pathnameParts = pathname.slice(1).split('/'); // ['user', 'repo', 'pull', '342']
const repoPath = pathnameParts.slice(2).join('/'); // 'pull/342'
Expand Down

0 comments on commit a4dd70c

Please sign in to comment.