Commit 150ac6f
authored
Template aware parsing (#143)
* Add language-aware class sorting
Keep template expressions opaque while sorting adjacent static runs.
Infer profiles from paths and preserve legacy behavior for unknown sources.
* Fix language-aware class extraction regressions
Preserve template expressions across inferred and explicit language
profiles while keeping valid Tailwind punctuation sortable in unknown
files.
Use indexed markup spans for large documents, respect Svelte component
case semantics, and restore positional custom-regex captures.
* Document language-aware sorting changes
Record the new language profiles, template-safety fixes, compatibility
behavior, performance work, and public API migrations.
* Update cache and string dependencies
* Bump Rust deps and add update task
Upgrade several crate dependencies across `rustywind-core` and `xtask`, including benchmarking, allocator, CLI, networking, and archive tooling. Also add a `just update` recipe to refresh workspace dependencies more easily.
* Adapt code to updated dependencies
* Parse Astro and templates with Winnow
Add typed markup extraction and first-class Astro handling while
preserving template islands. Avoid repeated tag scans and keep
legacy-compatible Lit and Ruby markup sortable.
* Document Astro parsing and breaking changes
* Add short CLI aliases
Add single-letter aliases for common options to reduce command input
cost while keeping full-length flags supported.
Update README usage output, changelog notes, and parsing tests to cover
the new -p, -l, and -f behavior.
* Prevent class sorting from rewriting templates
Validate wrapped captures and attribute names before sorting. Respect
HTML casing, PHP comment delimiters, and escaped Blade directives so
source expressions remain byte-exact.
* Parse Svelte block tags for class sorting
Separate document template islands from class-value expressions so Svelte
closing tags no longer disable sorting for the entire file.
Track Svelte block structure and preserve fail-closed behavior for malformed
markup.1 parent 3d7b936 commit 150ac6f
23 files changed
Lines changed: 4753 additions & 812 deletions
File tree
- rustywind-cli/src
- rustywind-core
- benches
- src
- tests
- xtask
- src/commands
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
5 | 48 | | |
6 | 49 | | |
7 | 50 | | |
| |||
0 commit comments