Skip to content

Extra space in array definition breaks following indentation scopes. #2341

@enyo

Description

@enyo

This coffee script:

describe "test", () ->
  x = [
    1, 2
   ] # <-- A space at the beginning of this line
  describe "innerTest", () ->
    "Wrong indentation"

(note the extra space before ])

compiles to:

describe("test", function() {
  var x;
  return x = [1, 2];
});

describe("innerTest", function() {
  return "Wrong indentation";
});

This only happens with exactly one space. Two spaces pass just fine, and more result in a syntax error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions