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

Svelte attributes can not be parsed correctly #545

Closed
alexprey opened this issue Aug 19, 2020 · 3 comments
Closed

Svelte attributes can not be parsed correctly #545

alexprey opened this issue Aug 19, 2020 · 3 comments

Comments

@alexprey
Copy link

alexprey commented Aug 19, 2020

I'm use this library to parse and analyze svelte component markup and actually have issue with following markup:

<button on:click={() => alert('click')} />

As a result I have following output from parser events:

onopentagname "button"
onattribute "on:click" "{()"
onattribute "="

KatChaotic/sveltedoc-parser#28

alexprey added a commit to alexprey/htmlparser2 that referenced this issue Aug 20, 2020
alexprey added a commit to alexprey/htmlparser2 that referenced this issue Aug 20, 2020
@fb55
Copy link
Owner

fb55 commented Aug 21, 2020

Unfortunately parsing Svelte markup is out of scope for this parser; it should only parse HTML.

@alexprey
Copy link
Author

If someone else it was intersting:
I'm implement this feature and publish as a fork package https://www.npmjs.com/package/htmlparser2-svelte

@fb55
Copy link
Owner

fb55 commented Aug 24, 2020

Awesome to see, @alexprey!

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

2 participants