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

feat: add custom splitlines to avoid line splitting on text formatter #2

Merged

Conversation

flavienSindou
Copy link

This PR addresses an issue where certain characters are interpreted as newline characters by str.splitlines, causing SSE messages to be incorrectly split and resulting in incomplete messages.
see https://docs.python.org/3.11/library/stdtypes.html#str.splitlines

This issue is outlined in
FiligranHQ/filigran-sseclient#1 thanks to unsub42.

To resolve this, we implemented a custom splitlines method that splits lines based strictly on a defined set of newline characters.

@flavienSindou flavienSindou merged commit 72bf520 into master Oct 29, 2024
@flavienSindou flavienSindou deleted the issue/fix-unescaped-newline-chars-crop-message branch October 29, 2024 06:21
@flavienSindou flavienSindou mentioned this pull request Oct 29, 2024
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

Successfully merging this pull request may close these issues.

2 participants