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

Truncate original messages more gently when replying #1428

Merged
merged 4 commits into from
Jul 21, 2021

Conversation

tadzik
Copy link
Collaborator

@tadzik tadzik commented Jul 21, 2021

Fixes #801

  • No longer breaks unicode characters in half
  • No longer forgets to add the ellipsis in some cases
  • Tries to stop at the word boundary unless that'd make the result too short

@tadzik tadzik requested a review from a team July 21, 2021 14:21
@tadzik tadzik force-pushed the tadzik/gh-801/better-reply-truncation branch from 0494c61 to 123f5b7 Compare July 21, 2021 14:23
Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, you're overdoing it a bit on your tests though :)

spec/unit/TrimString.spec.js Outdated Show resolved Hide resolved
@tadzik tadzik merged commit 4eb8a25 into develop Jul 21, 2021
@tadzik tadzik deleted the tadzik/gh-801/better-reply-truncation branch July 21, 2021 15:00
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.

reply prefixes should be rounded to the nearest word and ellipsis added if truncated
2 participants