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

Unexpected token (Note that you need plugins to import files that are not JavaScript) #4312

Closed
dadiborn opened this issue Jan 23, 2020 · 3 comments · Fixed by #4327
Closed
Labels

Comments

@dadiborn
Copy link

Describe the bug
When in script section there is Inline comment and right after it Block comment we can expect error.

To Reproduce
Write inline comment then press enter to write code from new line and write block comment

https://svelte.dev/repl/1ad2f11fa4a549bdb67703b5f16a0f4f?version=3.17.3

@Conduitry Conduitry added the bug label Jan 23, 2020
@vipero07
Copy link

vipero07 commented Jan 23, 2020

To try and help point in the right direction, this seems to only occur within a function, e.g. https://svelte.dev/repl/4b02fa5d09214f4bb06c050bc7da59c3?version=3.17.3
works fine.
It also seems to work if you put anything after the second comment.
https://svelte.dev/repl/7737861b9c1b45e8a558e5d8457b8ca5?version=3.17.3

@Conduitry
Copy link
Member

Opened Rich-Harris/code-red#28 for the underlying code generation issue.

@Conduitry
Copy link
Member

Fixed in 3.18.1 - https://svelte.dev/repl/1ad2f11fa4a549bdb67703b5f16a0f4f?version=3.18.1 - The comments still don't end up in quite the right place, but they no longer end up on the same line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants