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

await blocks fail when using CRLF line endings #1132

Closed
jamesbirtles opened this issue Jan 25, 2018 · 3 comments
Closed

await blocks fail when using CRLF line endings #1132

jamesbirtles opened this issue Jan 25, 2018 · 3 comments
Labels

Comments

@jamesbirtles
Copy link
Contributor

Using the await example from the repl on windows (line endings CRLF) generates invalid javascript that webpack chokes on as you can see below. Changing the file to LF fixes the issue.

webpack stack trace
Module parse failed: Unexpected token (89:3)
You may need an appropriate loader to handle this file type.
| 
| // (4:19) 
         <p>wait for it...</p>
     {{then answer}}
| function create_pending_block(state, _, component) {
|     var p, text;
| 
 @ ./templates/.main.rendered.js 8:1630-1768
 @ multi ./templates/.main.rendered.js style-loader/lib/addStyles css-loader/lib/css-base
@Conduitry Conduitry added the bug label Jan 25, 2018
@Conduitry
Copy link
Member

Interesting. Invalid js isn't being generated for other types of tags/blocks/etc that you've noticed? Once we fix this, it would be good to extend the tests so that they're also run with \n replaced with \r\n in the input.

@jamesbirtles
Copy link
Contributor Author

jamesbirtles commented Jan 25, 2018

Correct, I've used each and if blocks with no issue thus far

@Rich-Harris
Copy link
Member

Thanks — released 1.54 with @Conduitry's fix

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

No branches or pull requests

3 participants