aboutsummaryrefslogtreecommitdiffstats
path: root/chocula/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'chocula/util.py')
-rw-r--r--chocula/util.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/chocula/util.py b/chocula/util.py
index ce48ab6..b915e94 100644
--- a/chocula/util.py
+++ b/chocula/util.py
@@ -362,6 +362,7 @@ def test_clean_str():
def clean_issn(s: str) -> Optional[str]:
s = s.strip().upper()
+ s = s.replace(' ', '')
if len(s) == 8:
s = s[:4] + "-" + s[4:]
if len(s) != 9 or s[4] != "-":
@@ -373,3 +374,4 @@ def test_clean_issn():
assert clean_issn("1234-5678") == "1234-5678"
assert clean_issn(" 12345678") == "1234-5678"
assert clean_issn("123445678") == None
+ assert clean_issn("2249 - 8257") == "2249-8257"