-
-
Notifications
You must be signed in to change notification settings - Fork 514
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
☂️ HTML Parsing and Formatting #4726
Comments
What is this feature flag? In addition to the automated tests, I'd like to be able to run the main biome executable while hacking on html support! |
I'm referring to this: biome/crates/biome_cli/Cargo.toml Line 81 in eedb22e
The easiest way to hack on the formatter is to use the |
Probably something you've thought about, but HTML isn't always the 'vanilla' flavour. Handlebars, Liquid, ERB and several other templating languages exist. They often add some 'special tags' on top of HTML. As a first, it would be great if it could just 'ignore' those sections, i.e. continue parsing the file but not trying to interpret anything non-standard. Then maybe as a second step also understand the handlebars/liquid/erb etc. stuff (probably via plugins?). |
@sandstrom you might not know that, but Biome parsers are recoverable and error resilient, which means you can have even non-standard syntax inside (in this case) an HTML file, and you'll still get something somewhat analysable :) |
@ematipico Sounds like you've already thought about it! 😄 Great! |
Description
This will track the overall status of the HTML parser and formatter. This issue can be closed when the feature flag for HTML is removed, and the HTML parser and formatter is publicly available. This does not track anything for the HTML analyzer (for lint rules).
This is necessary in order for Biome to support framework specific template languages, like Vue, Svelte, and Angular. If you are a user of one of these frameworks, Biome already has support for processing embedded JS/TS in these files, but with some caveats. We have recommended configuration here to help provide the best experience for the time being.
Status
Overall: Kinda flaky, but technically functional.
htmlWhitespaceSensitivity
vueIndentScriptAndStyle
How to Contribute
All well defined smaller tasks can be found by looking at the L-HTML label. Looking to contribute? Start by looking there.
The text was updated successfully, but these errors were encountered: