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

JSX arrow function prop produces a closing tag #244

Open
aprilmintacpineda opened this issue Jan 6, 2020 · 2 comments
Open

JSX arrow function prop produces a closing tag #244

aprilmintacpineda opened this issue Jan 6, 2020 · 2 comments

Comments

@aprilmintacpineda
Copy link

aprilmintacpineda commented Jan 6, 2020

Enter in the following code:

<TestComponent onDone={() = } />

Notice that I intentionally left out arrow function like that, now you know what's next there right? The moment you type in the next character in the arrow function which is >, you'll get:

<TestComponent onDone={() =></div>} />

The same thing also happens with these:

<TestComponent onDone={() =}
<TestComponent
  test={() =}
/>

These works as expected:

<TestComponent onDone={() =
<TestComponent
  test={() =
/>
@neaumusic
Copy link

neaumusic commented Jan 8, 2020

agreed this is super annoying, I did file a bug about this but nobody's gotten around to it

@danro
Copy link

danro commented May 10, 2020

Not necessarily a fix, but you can disable this behavior by adding:

"auto_close_tags": false

To your "Settings - Syntax Specific" json file.

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

3 participants