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 signaturepull/186/head
parent
705473198f
commit
aae2c6b3d4
|
|
@ -411,7 +411,7 @@ def text_strip(text, strip=""):
|
||||||
return text
|
return text
|
||||||
|
|
||||||
stripped = re.sub(
|
stripped = re.sub(
|
||||||
fr"[{''.join(map(re.escape, strip))}]", "", text, re.UNICODE
|
fr"[{''.join(map(re.escape, strip))}]", "", text, flags=re.UNICODE
|
||||||
)
|
)
|
||||||
return stripped
|
return stripped
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue