-
-
Notifications
You must be signed in to change notification settings - Fork 148
Description
The following piece of code is valid but it is parsed incorrectly:
export const a = <div>me & you</div>Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wG4AocpAD0ljjQgDsBneFOAXjgB4ATYADcAfCCRwAZHACeEAK48A9AJFA
I unfortunately couldn't get the CLI to find installed languages (if absolutely required, they are located in ~/.local/share/nvim/lazy/nvim-treesitter; if someone could help me find what I need to add to ~/.config/tree-sitter/config.json, I can absolutely do that). However, nvim's :InspectTree could hopefully be enough to paint the picture:
There was a very similar issue with ampersands in jsx attributes - it was remedied, however the jsx_text node is still broken.
Also if the ampersand if a part of an html entity, the parser works as expected:
