Revised the strip_text filter to return None when the text is empty.

This commit is contained in:
依瑪貓 2023-02-26 08:00:58 +08:00
parent 9af9afd14d
commit a672a13789

View File

@ -29,4 +29,5 @@ def strip_text(s: str | None) -> str | None:
"""
if s is None:
return None
return s.strip()
s = s.strip()
return s if s != "" else None