prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Placeholder contains ^J instead of \n
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Weird, if I pass a \n character to the placeholder attribute of prompt() (added in #1215), it displays ^J instead of a newline.
I do that because I'm also passing multiline=True and I want a multiline placeholder. Am I doing it bad, or is it a bug?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the prompt() implementation and trace how the placeholder is rendered when multiline=True. Reproduce the issue with a placeholder containing \n, then verify that the displayed placeholder uses a newline instead of ^J.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100