tree-sitter-html icon indicating copy to clipboard operation
tree-sitter-html copied to clipboard

Web-components (lit-html) support

Open thekaganugur opened this issue 2 years ago • 0 comments

Hi,

I have started learning about web-components and there is some weird syntax related to it. This PR solves a lot of problems. There is still one big major issue left, related to how HTML parses arrow functions.

Please see this issue comment for a nice explanation.

Basically there is a syntax like this <button @click="${(x) => x.handlePress()}"> and this <button @click=${(x) => x.handlePress()}>. The one with quotes handled by the PR mentioned above. The problem comes with the second part.

<button @click=${this.handlePress}> --> this works with injection. <button @click="${(x) => x.handlePress()}"> --> doesn't work because => part forces it to HTML.

Is it possible we solve this somehow?

Thanks.

thekaganugur avatar Oct 20 '22 06:10 thekaganugur