fix: correct regex operator precedence for pattern anchoring#2122
fix: correct regex operator precedence for pattern anchoring#2122themavik wants to merge 1 commit intoelementary-data:masterfrom
Conversation
Change /^px|cm|...|Q$/ to /^(px|cm|...|Q)$/ so that ^ and $ anchor the entire alternation, not just the first and last alternatives. Co-authored-by: Cursor <cursoragent@cursor.com>
|
👋 @themavik |
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughA minor textual correction to error message strings in the monitoring report HTML file, adjusting the formatting of error descriptions by removing a leading hyphen character. No functional or behavioral changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.40.5)elementary/monitor/data_monitoring/report/index.htmlThanks 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 |
Fixes #2036
The regex
^px|cm|...|Q$had misleading operator precedence where^only anchoredpxand$only anchoredQ. Updated to^(px|cm|...|Q)$to properly anchor the full alternation.Summary by CodeRabbit