Skip to content

Multiline comment causes indentation failure #4034

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
ingydotnet opened this issue Jul 10, 2015 · 4 comments
Closed

Multiline comment causes indentation failure #4034

ingydotnet opened this issue Jul 10, 2015 · 4 comments

Comments

@ingydotnet
Copy link

> cat x.coffee 
class X
  foo: ->
###
stuff
###
  bar: ->
  baz: ->
> coffee -p x.coffee 
/home/ingy/x.coffee:7:10: error: unexpected indentation
  baz: ->
         ^

A few things:

  • Indenting the ### makes it parse (even if the content is not indented)
  • Unindented single line comments work fine in the same context
  • The error does not occur until the end of the stream

I was using ### to comment out parts of a file that I was porting to CS, when I tripped on this.

@michaelficarra
Copy link
Collaborator

See duplicates.

@ingydotnet
Copy link
Author

I looked for a duplicate, and found things similar but not the same. Can you point out a dup?

@michaelficarra
Copy link
Collaborator

This is probably our most duplicated issue. #3993, #3717, #3159, #2973, #2805, #2445, #2374, #2344, #2025, #1925, #1559, #1375.

@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
Projects
None yet
Development

No branches or pull requests

3 participants