Skip to content

Commit a61463e

Browse files
committed
Strip whitespace when normalizing package names
Fixes #8
1 parent b04fc6d commit a61463e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pypi_browser/packaging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
def pep426_normalize(package_name: str) -> str:
16-
return re.sub(r'[-_.]+', '-', package_name).lower()
16+
return re.sub(r'[-_.]+', '-', package_name.strip()).lower()
1717

1818

1919
class UnsupportedPackageType(Exception):

0 commit comments

Comments
 (0)