Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Unit fixer , \n are removed #88

Open
n-richaud opened this issue Dec 28, 2022 · 1 comment
Open

Issue Unit fixer , \n are removed #88

n-richaud opened this issue Dec 28, 2022 · 1 comment

Comments

@n-richaud
Copy link

n-richaud commented Dec 28, 2022

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 :
image

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

@lyrixx
Copy link
Member

lyrixx commented Dec 28, 2022

Hello,

Thanks for your bug report 👍🏼

Do you want to work on a PR? If you can't, don't worry, we'll take care of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants