Robin Malfait f3e78807af
Parse candidates in .svelte files with class:abc="condition" syntax (#13274)
* handle `.svelte` file

In svelte there is a convention where you can use `<div
class:px-4="condition" />` which means that we extract `class:px-4` as a
utility where `class` is a variant.

This is obviously incorrect, to solve this we can ignore the `class:`
part before parsing the whole file.

This is also what we do in v3.

Ideally we have completely separate parsers for various programming
languages (based on file type) and fallback to the generic one we have
now.

Implementing that, is a much bigger scope.

* flatten match arms

* add test to verify we can parse `class:px-4="condition"`

* explicitly ingore everything but the svelte file

* merge tests

There is some funky stuff happening when running `cargo test` where it
sees contents from another test. Maybe a bug in the tmpdir crate.

I don't see this problem locally when running `cargo nextest run`, but
when using the native `cargo test` command it fails.

* update changelog

* run prettier

* Update oxide/crates/core/src/lib.rs

Co-authored-by: Jordan Pittman <jordan@cryptica.me>

* fixup syntax errors

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-03-18 23:24:22 +01:00
..
2024-03-05 14:29:15 +01:00
2024-03-05 14:29:15 +01:00
2024-03-05 14:29:15 +01:00
2024-03-05 14:29:15 +01:00
2024-03-05 14:29:15 +01:00

Tailwind CSS Oxide