JoliTypo
JoliTypo copied to clipboard
Issue Unit fixer , \n are removed
I have an issue with some fixers , \n are removed . Example with this text :
## Verrückt und Harakiri 2
Am Tag nach dem
the fixer fiw the text like this
## Verrückt und Harakiri 2 Am Tag
Here the preg_match output of the regex of the fixer :
I found the problem is that \s match \n . So to fix this we should replace \s by his equivalent minus \n .
I foud this in the python doculentation of re lib :
When the UNICODE flag is not specified, it matches any whitespace character, this is equivalent to the set [ \t\n\r\f\v]. The LOCALE flag has no extra effect on matching of the space. If UNICODE is set, this will match the characters [ \t\n\r\f\v] plus whatever is classified as space in the Unicode character properties database.
So replace \s by \t\r\f\v can be a solution