You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the newline character \n in the question's message, then a long message does not get wrapped according to the terminal width anymore. In my case, we add a trailing newline character to the message to always receive the answer in the next line.
This is a screenshot of the unwrapped message:
The behavior has been verified on Linux (Ubuntu 22.04, GNU bash 5.1.16) and macOS.
Example
importquestionaryquestionary.text(message="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua\n.").ask()
Steps to reproduce
No response
Expected behaviour
Line wrap should work despite newline characters \n in the message.
Latest version
I have checked that this issue occurs on the latest version of questionary.
Questionary version
2.0.1
Prompt Toolkit version
3.0.36
Operating System
Linux
The text was updated successfully, but these errors were encountered:
Hi @Sarah1103. Please feel free to just work on this issue (or any other issues you like) and submit a PR when you are done. It sometimes takes me a little while to review, but I will eventually and if it passes all tests etc. will get merged in. Thank you for offering to help!
Describe the bug
When using the newline character
\n
in the question's message, then a long message does not get wrapped according to the terminal width anymore. In my case, we add a trailing newline character to the message to always receive the answer in the next line.This is a screenshot of the unwrapped message:
The behavior has been verified on Linux (Ubuntu 22.04, GNU bash 5.1.16) and macOS.
Example
Steps to reproduce
No response
Expected behaviour
Line wrap should work despite newline characters
\n
in the message.Latest version
Questionary version
2.0.1
Prompt Toolkit version
3.0.36
Operating System
Linux
The text was updated successfully, but these errors were encountered: