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

fix: introduce paragraphs to handle line breaks in text #86

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Conversation

JarKz
Copy link
Contributor

@JarKz JarKz commented Dec 20, 2024

Motivation

When a text was sent with line breaks due some reasons. Usually it made for structuring. But the application doesn't handle this case, so it ended up not beautiful result. Text which should be separated into paragraphs looks like single massive paragraph.

Changes

Now the text with line breaks separates into paragraphs correctly. The ellipsization rule works as previously, but here adds a new rule - "If line from next paragraph cannot be ellipsized, then don't include the words from next paragraph to current and put ellipsis to the last line with word removal if needed".

@JarKz JarKz requested a review from jsonmaf1a December 20, 2024 07:39
@JarKz JarKz self-assigned this Dec 20, 2024
@JarKz JarKz merged commit 1967f14 into main Dec 20, 2024
5 checks passed
@JarKz JarKz deleted the paragraphs branch December 20, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants