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

New line after instructions #234

Open
1 task done
woile opened this issue Jun 13, 2022 · 2 comments
Open
1 task done

New line after instructions #234

woile opened this issue Jun 13, 2022 · 2 comments
Labels
Enhancement New feature or request

Comments

@woile
Copy link

woile commented Jun 13, 2022

Question

Hello there! I was wondering if it is possible to add a new line after setting some instructions. The instructions may be long, so it would be nice to do that. I've checked the docs, but I didn't find anything relevant. I searched for new line and instruction.

questions = [
        {
            "type": "text",
            "name": "field_name",
            "message": "Field Name",
            "instruction": "Name used for something, specially for foo and bar, just making the text relatively long",
        }
]
questionary.prompt(questions)

Thanks a lot 🙏🏻 !

What have you already tried?

Adding a new line at the end: Name used for something, specially for foo and bar, just making the text relatively long\n. But the style is underlined, so the new line is underlined as well

Screenshot 2022-06-13 at 09 36 08

Read the documentation

  • I have checked to ensure that my question is not answered by the documentation.
@woile woile added the Question Further information is requested label Jun 13, 2022
@kiancross
Copy link
Collaborator

I don't think it is possible to do exactly as you want. You could possibly remove the underline style from instruction. Alternatively, move the text from instruction into message, then set instruction to \n.

@Wulf-Steppen
Copy link

I just opened an enhancement fro something similar #252

Different specific scenarios, but having the ability to format only specific parts of a question would be helpful.

@kiancross kiancross added Enhancement New feature or request and removed Question Further information is requested labels May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants