We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
normalizeAsUrl
1 parent 3bd970c commit 176c8f8Copy full SHA for 176c8f8
1 file changed
src/lib/utils/index.js
@@ -29,7 +29,7 @@ export function getRepoParts(repoFullname) {
29
* @returns {string}
30
*/
31
export function normalizeAsUrl(string) {
32
- return string.toLowerCase().replace(/\s+/g, "-");
+ return string.trim().toLowerCase().replace(/\s+/g, "-");
33
}
34
35
/**
0 commit comments