Skip to content

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

Closed
bhuga opened this issue Jan 10, 2012 · 3 comments
Closed

Block comment parse error #2025

bhuga opened this issue Jan 10, 2012 · 3 comments
Labels

Comments

@bhuga
Copy link

bhuga commented Jan 10, 2012

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.

@michaelficarra
Copy link
Collaborator

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.

@rlidwka
Copy link

rlidwka commented Mar 24, 2012

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. :)

@GeoffreyBooth
Copy link
Collaborator

This is fixed via #4572. Sorry it took awhile.

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

4 participants