Extract classes from interpolated expressions in Ruby (#19730)
This PR ensures that interpolated expressions in Ruby syntax are correctly extracted.
The issue was that we ignore comments in Ruby syntax (which start with
#). We already made an exception for locals (<%# locals: … %>), but we also need to handle interpolated expressions (#{ … }) in the same way because they are not comments.Fixes: #19728
Test plan
- Existing tests pass
- Added a regression test for this scenario
- Tested using the extractor on the given code snippet:
Notice that the
w-100gets extracted now.
A utility-first CSS framework for rapidly building custom user interfaces.
Documentation
For full documentation, visit tailwindcss.com.
Community
For help, discussion about best practices, or feature ideas:
Discuss Tailwind CSS on GitHub
Contributing
If you’re interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.