-
Couldn't load subscription status.
- Fork 21
fix(play-console): preserve whitespace #674
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
base: main
Are you sure you want to change the base?
Conversation
components/play-console/element.css
Outdated
| } | ||
|
|
||
| code { | ||
| pre { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just white-space: preserve isn't cutting it. The > and ####... are getting rendered on different lines.
We need <li> to not wrap and the text content to wrap. Let me know how the latest commit fares:
Code used
console.log(" abcd d c ");
console.log(" abcd \nd c ");
console.log("a".repeat(300));There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use a fixed width for the line indicator, and reuse that width for calculating the code with.
Co-authored-by: Claas Augner <[email protected]>



Description
The output lines are displayed only in
<code>blocks, so the HTML rendering is collapsing the whitespaces. As the content is only the text log strings, using only inline<pre>blocks solves the problem.Additional details
Code used to test:
Before fix
After fix
Related issues and pull requests
Fixes #668