-
Notifications
You must be signed in to change notification settings - Fork 2k
Block comment parse error #2025
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
Block comments need to be indented properly, since they're included in the output. I don't see any bugs here. rant: I don't think there's any reason for block comments to be output, but that's my opinion and not a popular one. |
trivial example is: test ->
# this will be compiled just fine
return 123
test ->
###
but this will throw indentation error
###
return 123
test ->
###
so you have to write like this
###
return 123 I dont know if it is a bug, but I've spent some time debugging it just now :) PS: I'm using block comments to comment out a code I dont want to be compiled right now. So preserving it in the output is a something I wouldn't want too. :) |
This is fixed via #4572. Sorry it took awhile. |
I found some weird behavior today. I block-commented a class while testing and coffee failed to parse, but moving the block-commented class to the bottom of the file allowed the parsing to complete. I could not replicate the behavior with a trivial example, so I posted the file I was working with.
https://gist.github.com/1590793
I'm not sure if this is me using block comments wrong, but it seems unlikely that that the location of syntactically correct comments should cause a parse error. If I am using them incorrectly, the section of the docs on block comments does not note it, and the error message is not terribly helpful.
Thanks.
The text was updated successfully, but these errors were encountered: