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
pull/186/head
pevisscher 2020-08-24 16:51:06 +02:00 committed by GitHub
parent 705473198f
commit aae2c6b3d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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