-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Whitespace being trimmed and not complying with HTML spec #7216
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
Comments
[UPDATE] This was the wrong comment so I rescinded it. |
I don't think that's what is going on here? For example, I tried copying the HTML I pasted into a There's no I also updated the Svelte code in the REPL to the following based on your suggestion and I still get incorrect spacing:
|
The only way to solve it appears to be replacing all spaces with
Is this really the recommended way to do this? |
Oops. Sorry, I said wrong things... When I comment above, at the same time I changed space (' ') to This issue has been fixed in this PR. I tried this on the latest master branch, and the spaces were inserted correctly. [Code]
|
This was fixed by #6990 and will be part of the next release |
Ah, nice. I didn’t see that PR. Thanks! |
Describe the bug
If I have the following code:
This strips some of the whitespace in svelte:
https://svelte.dev/repl/d2c6b9c46dd045dc9726d0ba819f1f93?version=3.46.3
But this is what I'm expecting it to render as:
https://codebeautify.org/htmlviewer/y22174c86
This HTML is syntax highlighted code that is generated from Markdown, and works when rendering HTML in other locations.
Am I missing something? Why does it not work in Svelte?
Reproduction
https://svelte.dev/repl/d2c6b9c46dd045dc9726d0ba819f1f93?version=3.46.3
Logs
No response
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: