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

parseExpressionAt throws SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag even though the element is wrapped in an enclosing tag #127

Open
Momijiichigo opened this issue Sep 14, 2021 · 0 comments

Comments

@Momijiichigo
Copy link

Momijiichigo commented Sep 14, 2021

Target code:

(<div>
    <Header />
</div>)

The code below throws SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag even though the Header element is wrapped in an enclosing tag:

const MyParser = Parser.extend(
  jsx()
)
console.log(
  MyParser.parseExpressionAt(code, code.indexOf('<Header'), { ecmaVersion: 'latest', sourceType: "module" })
)
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

1 participant