Skip to content

Commit

Permalink
Strip whitespace when normalizing package names
Browse files Browse the repository at this point in the history
Fixes #8
  • Loading branch information
chriskuehl committed May 15, 2024
1 parent b04fc6d commit a61463e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypi_browser/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


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


class UnsupportedPackageType(Exception):
Expand Down

0 comments on commit a61463e

Please sign in to comment.