Let comma_space_split return empty list if string is all blank.
This commit is contained in:
parent
5f5f41885e
commit
ac647a37a8
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,8 @@ def comma_space_split(text) -> list:
|
||||||
'''
|
'''
|
||||||
if text is None:
|
if text is None:
|
||||||
return text
|
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:
|
def excise(text, mark_left, mark_right) -> str:
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue