Skip to content

Unexpected indentation with newline delimited attributes #59

Description

@rraval

Try Coffee-React link

If I have JSX that looks like:

<Foo
  className="Foo">

  <Bar
    className="Bar">

    {expr}
  </Bar>
</Foo>

This gets compiled to:

React.createElement(Foo, { \
  "className": "Foo"},

  React.createElement(Bar, { \
    "className": "Bar"},

    (expr)
  )
)

CoffeeScript chokes on this input, claiming unexpected indentation. Strangely, if I remove either of the backslashes (or put the attributes on the same line, which makes the transform produce equivalent code), it works without a problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions