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

Do not split message on newlines #482

Merged
merged 3 commits into from
Nov 1, 2022
Merged

Do not split message on newlines #482

merged 3 commits into from
Nov 1, 2022

Conversation

42wim
Copy link
Owner

@42wim 42wim commented Oct 14, 2022

This fixes #480 and as a bonus also fixes #426 as this is now just 1 big message for irc

This fixes #480 and as a bonus
also fixes #426 as this is now
just 1 big message for irc
@42wim 42wim added this to the 0.26.0 milestone Oct 14, 2022
@42wim
Copy link
Owner Author

42wim commented Oct 14, 2022

@hloeung any feedback, am I missing something that maybe will break? :)

@hloeung
Copy link
Collaborator

hloeung commented Oct 15, 2022

Might be IRC line limits. Also a large message with a mixture of text and code blocks where texts with empty lines aren't removed? Probably not a big deal though.

@42wim
Copy link
Owner Author

42wim commented Oct 15, 2022

The IRC line limits are not an issue, we're splitting the lines before sending them on IRC
I've also add another commit to also check for the codeblock starting on other lines.

wrt to empty lines I think the advantages outweigh the possible disavantage of some few empty lines when mixing codeblocks with non-code blocks.

It can be optimized later though, but not a showstopper for this change.

@hloeung
Copy link
Collaborator

hloeung commented Oct 16, 2022

@42wim #483 merge into this one

…e message (#483)

* Ensure prefixcontext/suffixcontent shown for all lines in a multi-line message

* Make showing context for multi-line messages configurable

* Fix to handle empty lines now that we're splitting elsewhere

* Restore changes to MsgSpoofUser() and Spoof() per review

* Allow overriding max. line length

* Fix to correctly add message thread context

* Refactor and remove duplicate code per review
@42wim 42wim merged commit e47926b into master Nov 1, 2022
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.

Unable to reply to a multi-line message using any line's short thread ID Messages still showing out of order
2 participants