Detect classes in Ruby percent literals using angle brackets or custom delimiters - #20387
Detect classes in Ruby percent literals using angle brackets or custom delimiters#20387lazerg wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughRuby 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported nested-angle truncation is addressed by balancing inner Reviews (3): Last reviewed commit: "Only treat a percent literal as a litera..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 435ede9e-0900-48af-b4b7-f5dd15aad4f2
📒 Files selected for processing (2)
CHANGELOG.mdcrates/oxide/src/extractor/pre_processors/ruby.rs
Summary
Fixes #20386.
Ruby lets you close a
%w/%Wliteral 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!…!incrates/oxide/src/extractor/pre_processors/ruby.rs. They fail onmainand pass with this change.