coffee-react-transform icon indicating copy to clipboard operation
coffee-react-transform copied to clipboard

comments cause SyntaxError: Unexpected end of input: unclosed CJSX_ESC

Open littlebee opened this issue 10 years ago • 1 comments

Without the comment, the following compiles and renders fine:

  x.IndexView = React.createClass
    displayName: "views.user.IndexView"

    render: () ->
      return (
        <div className="user-indexview">
          <h1>Say Hello to React.js</h1>
          <R.Collection collectionClass={App.models.user.Users} fetch={true}>
              {# this is a comment }
              <div className="test">
                <R.CollectionStats/>
              </div>
          </R.Collection>
        </div>
      )

With the comment, I get a "SyntaxError: Unexpected end of input: unclosed CJSX_ESC"

I've also seen this error show up on the outermost component if one of the inner components has an unmatched tag.

littlebee avatar Oct 28 '15 04:10 littlebee

also, replacing {# this is a comment} with {### this is a comment ###} works

littlebee avatar Oct 28 '15 04:10 littlebee