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

Live Comments for CoffeeScript #2177

Closed
Alexsey opened this issue Aug 16, 2019 · 1 comment
Closed

Live Comments for CoffeeScript #2177

Alexsey opened this issue Aug 16, 2019 · 1 comment

Comments

@Alexsey
Copy link

Alexsey commented Aug 16, 2019

The docs are saying that Live Comments are not available in CoffeeScript due to this issue but, actually, it has been resolved more than two years ago

@smcenlly
Copy link
Member

Thanks for letting us know about the update. This may fix live comments in some places, but after some testing, it appears mostly broken. Take the following example:

CoffeeScript

###
COMMENT WORKS
###

describe 'Student', ->
  it 'should report grade', ->
    student = new Student score: 75; # NO COMMENT IS OUTPUT
    expect(student.grade()### COMMENT IS IN THE WRONG PLACE ###).toBe('C')

Compiler Output

  (function() {
    /*
    BLOCK COMMENT
    */
    describe('Student', function() {
      return it('should report grade', function() {
        var student;
        student = new Student({
          score: 75
        });
        return expect(student.grade())./* COMMENT IS IN THE WRONG PLACE */toBe('C');
      });
    });
  }).call(this);

We will update our docs to indicate that Live Comments don't work due to CoffeeScript's comment migration behavior.

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

No branches or pull requests

2 participants