-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
77aac66
commit 4c049d1
Showing
3 changed files
with
67 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@mdx-js/language-service': patch | ||
--- | ||
|
||
Fix bug in virtual code generation for JSX closing elements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters