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

Missing "unclosed tag" error on child nodes. #56

Open
mikehaverstock opened this issue Jul 1, 2015 · 3 comments
Open

Missing "unclosed tag" error on child nodes. #56

mikehaverstock opened this issue Jul 1, 2015 · 3 comments

Comments

@mikehaverstock
Copy link

<div><b></div>

outputs:

React.createElement("div", null, "\x3Cb\x3E")

rather than throwing an error that <b> is unclosed. The JSX transformer throws an error:

Expected corresponding JSX closing tag for <b>
@mikehaverstock mikehaverstock changed the title Missing "unclosed tag" error on children nodes. Missing "unclosed tag" error on child nodes. Jul 1, 2015
@jsdf
Copy link
Owner

jsdf commented Jul 1, 2015

This is a consequence of how loose/dumb the parser is. I'm currently experimenting with a new implementation which would tighten up to the CJSX grammar a bit, in a way that would make detecting invalid tags much simpler.

@mikehaverstock
Copy link
Author

Do you have any idea on when the new parser will be done? Do you have any insight how to fix this problem with the current parser?

@jsdf
Copy link
Owner

jsdf commented Jul 2, 2015

No timeline on the new parser as yet. The current compiler could be made to fail if something which looks like a tag was detected in a CJSX 'text node', which isn't a very clean solution from a parsing perspective, but would probably catch most cases.

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