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

REPL should display multi-line strings in multiple lines #1640

Closed
JJtan2002 opened this issue Apr 3, 2024 · 2 comments
Closed

REPL should display multi-line strings in multiple lines #1640

JJtan2002 opened this issue Apr 3, 2024 · 2 comments
Labels
minor less important than important but more than nice-to-have Proposal Proposing a feature, please discuss

Comments

@JJtan2002
Copy link
Contributor

When displaying a multi-line string, the REPL is showing '\n' instead of newlines. The REPL should display each line separately, preserving the formatting of the input.

image
An example with multi-line strings in Python §1.

image
Another example with template literals in Source §1.

@JJtan2002 JJtan2002 added Bug Something isn't working minor less important than important but more than nice-to-have labels Apr 3, 2024
@JJtan2002 JJtan2002 changed the title REPL does not display multi-line strings correctly. REPL does not display multi-line strings correctly Apr 3, 2024
@martin-henz
Copy link
Member

martin-henz commented Apr 10, 2024

I'd say this is a feature, not a bug. The first argument of display shows the value as if it were a value expression in a program.

The second argument of display is displayed in the way you are requesting. Instead of the change proposed here, I have an alternative proposal: #1664

@martin-henz martin-henz added Proposal Proposing a feature, please discuss and removed Bug Something isn't working labels Apr 10, 2024
@martin-henz martin-henz changed the title REPL does not display multi-line strings correctly REPL should display multi-line strings in multiple lines Apr 10, 2024
@martin-henz
Copy link
Member

Closing this in favor of #1664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor less important than important but more than nice-to-have Proposal Proposing a feature, please discuss
Projects
None yet
Development

No branches or pull requests

2 participants