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

Add support to configure Parser #69

Open
clinejj opened this issue Jul 12, 2021 · 0 comments
Open

Add support to configure Parser #69

clinejj opened this issue Jul 12, 2021 · 0 comments

Comments

@clinejj
Copy link

clinejj commented Jul 12, 2021

This is stemming from an issue running erb-lint on files with AlpineJS syntax (Shopify/erb_lint#221), but it would be nice to add support to configure the parser to use some of the same configuration that better-html supports (in this case the partial_attribute_name_pattern would correct this). For example, being able to set config.partial_attribute_name_pattern = /\A[a-zA-Z0-9\-\:\@\.]+\z/ would allow for the following snippet to parse correctly:

<nav x-data="{ open: false }" @keydown.window.escape="open = false" class="bg-white border-b"></nav>

It looks like this might be a bit tricky given the underlying issue comes from the underlying html_tokenizer library.

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

1 participant