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: improve twitter paragraph splitting if containing url #1947

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

darwintree
Copy link
Contributor

Relates to

Risks

Low, improves twitter content splitting if containing url

Background

What does this PR do?

The function splitParagraph will split tweet in order for twitter max length. However, url format is not considered so blank(" ") will be added after url "."(which considered as the end of sentence), resulting in bad format.

This pull request first convert urls into a 23 character-long placeholder(which is what twitter take url into account), then do the splitting and at last restore the url

What kind of change is this?

Bug fixes as well as improvement

Documentation changes needed?

No

Testing

Where should a reviewer start?

Detailed testing steps

@shakkernerd shakkernerd changed the base branch from main to develop January 7, 2025 06:57
@tcm390
Copy link
Collaborator

tcm390 commented Jan 7, 2025

tested! works well :)

@shakkernerd shakkernerd merged commit 25fba34 into elizaOS:develop Jan 7, 2025
5 checks passed
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.

3 participants