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

[BUG] missing \ in replace #525

Open
arpitest opened this issue Jun 17, 2023 · 2 comments
Open

[BUG] missing \ in replace #525

arpitest opened this issue Jun 17, 2023 · 2 comments
Labels
good first issue hacktoberfest Issues for participation in the hacktoberfest https://hacktoberfest.com/

Comments

@arpitest
Copy link

arpitest commented Jun 17, 2023

here the 3rd replace is bad, it should be \\n -> \n:

elif isinstance(text, bytes):
    return text.replace(b'\\N', b'\\n')\
               .replace(b'\r\n', b'\n')\
               .replace(b'\n', b'\n')\
               .replace(b'\\,', b',')\
               .replace(b'\\;', b';')\
               .replace(b'\\\\', b'\\')
@niccokunzmann
Copy link
Member

niccokunzmann commented Jun 20, 2023 via email

@arpitest
Copy link
Author

here is a typo (missing \ ) this does not do anything this way:
.replace(b'\n', b'\n')
compare to non-bytes (str) version...

i dont want to work on this or to write tests etc, just noticed this typo while looking at your implementation and reported it.

@niccokunzmann niccokunzmann added good first issue hacktoberfest Issues for participation in the hacktoberfest https://hacktoberfest.com/ labels Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue hacktoberfest Issues for participation in the hacktoberfest https://hacktoberfest.com/
Projects
None yet
Development

No branches or pull requests

2 participants