Bug: `group-data-` classes parse as invalid, break conflict merging
geoffreygarrett opened ·
We discovered that `group-data-[collapsible=icon]` classes are treated as errors by the current parser. This causes `tw_merge!` to keep multiple conflicting classes (`!p-2` and `!p-0`) in the final string instead of allowing the latter to override.
**Steps to Reproduce** ```rust let merged = tw_merge!( "group-data-[collapsible=icon]:!p-2", "group-data-[collapsible=icon]:!p-0" ); // => incorrectly: "group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:!p-0" // expected: "group-data-[collapsible=icon]:!p-0" ```
**Root Cause** The parser only recognizes `data-` or `supports-` as data-attribute prefixes. It does not handle `group-data-`, so those classes become `Err(...)`.
**Proposed Fix** Let the parser also match `group-data-[...]` as a valid data-attribute variant. Then it merges as expected, leaving only the last important style.
- GE
Wrong repository, apologies, I had both open and submitted on the wrong one.