Skip to content

Conversation

@zardoy
Copy link
Contributor

@zardoy zardoy commented Dec 11, 2022

Fixes #51845
Fixes #47302

It wasn't working in the following cases:

;<SomeElem foo={''} [||] />
;<SomeElem foo={''} [||] x />
;<SomeElem foo={''} x[||] />
;<SomeElem foo={''} x[||] f />

(see linked issue with playground link)

On that line:

if (previousToken.kind === SyntaxKind.CloseBraceToken && currentToken.kind === SyntaxKind.GreaterThanToken) {

;<div foo={''} [||] /> // currentToken.kind = Slash
;<div foo={''} [||] test /> // currentToken.kind = Identifier

I couldn't figure out why currentToken.kind === SyntaxKind.GreaterThanToken is being used here, documentation comment doesn't state why this restriction is required. Also I saw all tests are passing locally.

hope doesn't break anything else
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Dec 11, 2022
@zardoy
Copy link
Contributor Author

zardoy commented Dec 13, 2022

It also seems to be fixing #47302 not sure why, but I added tests and updated body

@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Dec 13, 2022
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
@andrewbranch andrewbranch merged commit 4b69e13 into microsoft:main Jan 9, 2023
@andrewbranch
Copy link
Member

Thanks @zardoy!

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

No JSX attributes snippets after curly JSX attribute Completion Detection

4 participants