Skip to content

Heuristic for JSX completion happening at the very end of a component with children #875

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

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

zth
Copy link
Collaborator

@zth zth commented Dec 18, 2023

Comment in the code says it all. Fixes an edge case where completing <SomeComponent someProp=> after = wouldn't work because the parser doesn't parse this the same as <SomeComponent someProp= > (which does work because we get an expr hole in someProp=).

@zth zth requested a review from cristianoc December 18, 2023 21:01
Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, and great recovery.

@@ -45,3 +45,6 @@ module CompWithoutJsxPpx = {

// <CompWithoutJsxPpx n
// ^com

// <SomeComponent someProp=>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this also work when there are children present?

@zth zth merged commit 0d8fbc3 into master Dec 19, 2023
@zth zth deleted the fix-jsx-completion-end-of-component-with-children branch December 19, 2023 09:46
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

Successfully merging this pull request may close these issues.

2 participants