use correct re.sub signature

`text_strip` currently passes the regex flags as the count parameters, which is hardcoded to `re.UNICODE` (value 32), and thus only replaces the first 32 values.

see https://docs.python.org/3/library/re.html#re.sub for the signature
This commit is contained in:
pevisscher
2020-08-24 16:51:06 +02:00
committed by GitHub
parent 705473198f
commit aae2c6b3d4
+1 -1
View File
@@ -411,7 +411,7 @@ def text_strip(text, strip=""):
return text
stripped = re.sub(
fr"[{''.join(map(re.escape, strip))}]", "", text, re.UNICODE
fr"[{''.join(map(re.escape, strip))}]", "", text, flags=re.UNICODE
)
return stripped