-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Expected a # character immediately following the opening bracket - svelte(block_unexpected_character) #13483
Comments
Wasn't aware that it behaves differently based on runes vs. legacy. If it still works in legacy, this at least would not hinder people in using existing code, but the inconsistency in runes mode is odd. Either having no white space should be consistently enforced or it should just work the same as in legacy. The migration script should also remove the whitespace in case the white space is forbidden. |
So what is fixed here? I'd personally like the ability to use spaces in statements. I don't think a framework should enforce a particular style. That's for something like Prettier in my opinion, which I don't use because I like my own formatting. |
That decision was already made to speed up the parser and make the code easier to reason about... it's just about syntax that is supported from the framework |
Could that decision be reevaluated, please? It is understandable why it is better for performance and strict code, but from perspective of readability by human eye it is bad. |
I was talking about the parser code |
I was talking about the end-user (programmer) svelte code. Why is little bit of speed and code readability on parser side more important than all the code in svelte that is and will be written? Looks like I have to write some preprocessor to fix this oversight. |
Describe the bug
In Svelte 4 I was able to do:
Now in Svelte 5 that's an error. The following works but looks inconsistent:
Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE0XNzQqDMBAE4FcZtgcvgvTnFETa59AepG7oQkyCiUKRvHtZKvS0M98cdicrjhOZfic_zkyGHjFSTfkTtaSNXWaqKYV1eam0PzIhZgk-YVk9JzTd4Ae_4yQWeVkZZfAAcFY07BJDLOyo4Zgu_-mQq0ojVrvG-zvPDlU7ydbd2kZPhUI1zWESKzyR0V_lWb7XAM1xxwAAAA==
It works when you disable Runes Mode.
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: