github-url-detection 5.7.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/distribution/index.js +1 -1
- package/package.json +1 -1
package/distribution/index.js
CHANGED
|
@@ -351,7 +351,7 @@ const getUsername = () => {
|
|
|
351
351
|
return null === (_a = document.querySelector('meta[name="user-login"]')) || void 0 === _a ? void 0 : _a.getAttribute("content");
|
|
352
352
|
};
|
|
353
353
|
|
|
354
|
-
const getCleanPathname = (url = location) => url.pathname.slice(1, url.pathname.endsWith("/") ? -1 : void 0);
|
|
354
|
+
const getCleanPathname = (url = location) => url.pathname.replace(/\/+/g, "/").slice(1, url.pathname.endsWith("/") ? -1 : void 0);
|
|
355
355
|
|
|
356
356
|
const getRepo = url => {
|
|
357
357
|
if (!url) {
|