sindresorhus/refined-github








The issue has been closed
Some features don't work on branches with slashes #3004
fregante posted onGitHub
Any feature that makes use of pathnameParts[4]
or getReference
don't support branch names that contain /
.
The problem with extracting the branch from the URL is that branch/folder/folder/folder
is indistinguishable from branch/still/branch/folder
, so the branch cannot be safely determined from the URL.
fix-view-file-link-in-pr
and link-to-file-in-file-history
both have solutions for it, but I think they're not easily copy-able.
For example getReference
could be changed to:
// Tested on the Code tab
return select('#branch-select-menu summary .css-truncate-target').textContent
Originally discussed in https://github.com/sindresorhus/refined-github/pull/2998#issuecomment-613125320 cc @yakov116