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

Non-generic paragraph split. #2

Closed
omalk98 opened this issue Sep 10, 2023 · 1 comment
Closed

Non-generic paragraph split. #2

omalk98 opened this issue Sep 10, 2023 · 1 comment

Comments

@omalk98
Copy link

omalk98 commented Sep 10, 2023

Some Windows editors will use \r\n as a line break, which can cause the application to ignore line breaks.
This can lead to all paragraphs being packed together in a single paragraph tag.

Fix

6       import re
...
11     body_paragraphs = re.split(r"\r?\n\r?\n", "\n".join(lines[3:]))
...
14     body_paragraphs = re.split(r"\r?\n\r?\n", content)
@mnajibi
Copy link
Owner

mnajibi commented Sep 14, 2023

Code updated with provided solution

@mnajibi mnajibi closed this as completed Sep 14, 2023
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