Skip to content

Fix: Newlines replaced with spaces in botcmd args (#1716) #1717

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zaughon
Copy link
Contributor

@zaughon zaughon commented Mar 24, 2025

Original issue from #1307 remains fixed, but preserves newlines in the args:

[@CHANGE_ME ➡ @errbot] >>> !hello
[@CHANGE_ME ➡ @errbot] [␍] line 1
[@CHANGE_ME ➡ @errbot] [␍] line 2
[@CHANGE_ME ➡ @errbot] [␍] 
cmd = 'hello'
args = 'line 1\nline 2'
Hello! You said: line 1
line 2

# new lines in the middle of a command also works:

[@CHANGE_ME ➡ @errbot] >>> !this is a
[@CHANGE_ME ➡ @errbot] [␍] very long
[@CHANGE_ME ➡ @errbot] [␍] command
[@CHANGE_ME ➡ @errbot] [␍] 
cmd = 'this_is_a_very_long_command'
args = ''


[@CHANGE_ME ➡ @errbot] >>> !this is a
[@CHANGE_ME ➡ @errbot] [␍] very long
[@CHANGE_ME ➡ @errbot] [␍] command
[@CHANGE_ME ➡ @errbot] [␍] test
[@CHANGE_ME ➡ @errbot] [␍] 
cmd = 'this_is_a_very_long_command'
args = 'test'


[@CHANGE_ME ➡ @errbot] >>> !this is a
[@CHANGE_ME ➡ @errbot] [␍] very long
[@CHANGE_ME ➡ @errbot] [␍] command
[@CHANGE_ME ➡ @errbot] [␍] with a lot
[@CHANGE_ME ➡ @errbot] [␍] of test
[@CHANGE_ME ➡ @errbot] [␍] 
cmd = 'this_is_a_very_long_command'
args = 'with a lot\nof test'

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.

1 participant