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

Support comments in JSX #82

Closed
zpao opened this issue Jun 11, 2013 · 2 comments
Closed

Support comments in JSX #82

zpao opened this issue Jun 11, 2013 · 2 comments
Assignees

Comments

@zpao
Copy link
Member

zpao commented Jun 11, 2013

This should work:

<div>
  {/* this is a comment */}
</div>

But it doesn't. The fix for this will actually need to happen in https://github.com/facebook/esprima/tree/fb-harmony but I wanted to get it on file here so we can remember to call it out in the changelog.

@vjeux
Copy link
Contributor

vjeux commented Jun 11, 2013

Things we also talked about:

  • Adding <!-- comment --> that would be transformed into /* comment */
  • We can already do the following but they are not optimal: {{/* comment */}}, {[/* comment */]}, {!/* comment /*0}
  • Handlebar does the following: {{! comment }}
  • Javascript comments are already working within the tag: <div /* comment */> and <div // comment \n>

@ghost ghost assigned jeffmo Jun 11, 2013
@jeffmo
Copy link
Contributor

jeffmo commented Jun 18, 2013

Just an update: I've got a change to the parser queued up that allows for <div>{/* this is a comment*/}</div>.
I'll probably send it out tomorrow after I've had some time to do a little more extensive testing first...but it should do the trick

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

3 participants