JSX syntax error - two self-closing elements with no space between
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 10.3k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Description
module A = {
[@react.component]
let make = () => {
<>
<a/><a/>
</>;
}
}
This code gives a syntax error on line 5 - <a/><a/>. If you add whitespace between those elements, it fixes it. I'm seeing other issues similar to this, but they are closed, so I'm not sure if this is just a problem with an older version in the playground.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example in the linked Reason playground, first with adjacent self-closing elements and then with whitespace between them. Trace the JSX parsing entry point responsible for the syntax error; done means the shown JSX is accepted without requiring whitespace between the two elements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, ocaml
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100