Closed half-duplex closed 1 year ago
I do think replacing newlines with spaces is a sufficient short-term solution, but I may finally start taking a look at #43, as that'd also resolve this. I'll try and take a look later today.
Thanks! Another option, though this one may be better implemented by applications than girc: sopel-twitter replaces newlines with " ⏎ "
Should be implemented via https://github.com/lrstanley/girc/pull/43 -- let me know if you have any further issues.
🌧 Describe the problem
When calling Cmd.Message() with a message containing a newline, the newline is stripped, which smashes words together.
⛅ Expected behavior
The newline should be replaced with a space, instead of just stripped
🔄 Minimal reproduction
Call
Cmd.Message("#foo", "example\nmessage")
and observe that the resulting message is "examplemessage" instead of "example message"💠 Version: girc
v0.0.0-20220410132120-49de39aea653
🖥 Version: Operating system
linux/other
⚙ Additional context
I'm using girc via https://github.com/RITlug/teleirc . When a telegram message contains a newline, the resulting IRC message has this problem. It could be worked around in TeleIRC, but it seemed like girc would be a better place to fix it for everyone.
I'm not sure the best way to handle \r or \r\n - ideally collapsing runs of either to just one space?
🤝 Requirements