-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Function as Child Component #485
Labels
🗄 area/interface
This affects the public interface
💪 phase/solved
Post is done
🐛 type/bug
This is a problem
Comments
github-actions
bot
added
👋 phase/new
Post is being triaged automatically
🤞 phase/open
Post is being triaged manually
and removed
👋 phase/new
Post is being triaged automatically
labels
Dec 12, 2024
Thanks for reporting and including a reproduction! Cross reference: https://github.com/orgs/mdx-js/discussions/2514 |
remcohaszing
added
🐛 type/bug
This is a problem
🗄 area/interface
This affects the public interface
🙆 yes/confirmed
This is confirmed and ready to be worked on
👍 phase/yes
Post is accepted and can be worked on
labels
Dec 12, 2024
This comment has been minimized.
This comment has been minimized.
remcohaszing
added a commit
that referenced
this issue
Dec 22, 2024
Virtual code generation from estree expressions was based on an assumption of the order in which JSXIdentifier nodes are visited. `estree-walker` visits the nodes in property order. The parser generates AST properties in an order that broke our code generation. As a result, the string `_components.` was injected in an incorrect position in the virtual code, yielding syntax errors. This is now resolved by explicitly handling `JSXElement` nodes in both the enter and leave methods, instead of just handling `JSXIdentifier` nodes. Closes #485
6 tasks
remcohaszing
added a commit
that referenced
this issue
Dec 23, 2024
Virtual code generation from estree expressions was based on an assumption of the order in which JSXIdentifier nodes are visited. `estree-walker` visits the nodes in property order. The parser generates AST properties in an order that broke our code generation. As a result, the string `_components.` was injected in an incorrect position in the virtual code, yielding syntax errors. This is now resolved by explicitly handling `JSXElement` nodes in both the enter and leave methods, instead of just handling `JSXIdentifier` nodes. Closes #485
This comment has been minimized.
This comment has been minimized.
github-actions
bot
removed
👍 phase/yes
Post is accepted and can be worked on
🙆 yes/confirmed
This is confirmed and ready to be worked on
labels
Dec 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🗄 area/interface
This affects the public interface
💪 phase/solved
Post is done
🐛 type/bug
This is a problem
Initial checklist
Affected package
@mdx-js/[email protected]
Steps to reproduce
Create a function as child component w/ some nesting, i.e.
Actual behavior
Get a syntax error:
Expected behavior
No syntax error
Runtime
No response
Package manager
No response
Operating system
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: