tailwindcss/crates
Lazizbek Ergashev b8a5f85889
Detect classes in Ruby percent literals using angle brackets or custom delimiters (#20387)
## Summary

Fixes #20386.

Ruby lets you close a `%w`/`%W` literal with any non-alphanumeric
character, but the pre-processor only recognized `[`, `(`, `{`, `#` and
a space. So `%w<bg-green-400>` and `%w|bg-blue-400|` were skipped and
the classes inside them never made it into the output.

The boundary lookup now maps `<` to `>` alongside the other paired
delimiters, and falls back to treating any other non-alphanumeric,
non-whitespace character as its own closing delimiter.

## Test plan

Added pre-processor and extraction cases for `%w<…>`, `%w|…|`, `%w:…:`
and `%w!…!` in `crates/oxide/src/extractor/pre_processors/ruby.rs`. They
fail on `main` and pass with this change.

```
cargo test -p tailwindcss-oxide
```

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2026-08-06 14:52:04 +02:00
..
classification-macros Improve boundary classification (#17005) 2025-03-07 00:00:54 +00:00
ignore Incorporate changes from latest ignore crate (#19148) 2025-10-20 09:49:40 -04:00
node Use wasm as a fallback for @tailwindcss/oxide (#20383) 2026-08-04 18:41:43 +02:00
oxide Detect classes in Ruby percent literals using angle brackets or custom delimiters (#20387) 2026-08-06 14:52:04 +02:00