Let comma_space_split return empty list if string is all blank.

This commit is contained in:
voussoir 2022-03-15 13:37:57 -07:00
parent 5f5f41885e
commit ac647a37a8
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -26,7 +26,8 @@ def comma_space_split(text) -> list:
'''
if text is None:
return text
return re.split(r'[ ,]+', text.strip())
parts = re.split(r'[ ,]+', text.strip())
return [part for part in parts if part]
def excise(text, mark_left, mark_right) -> str:
'''