fix: recognize CSS whitespace in named grid areas - #556
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe grid-area rule now treats tabs and repeated spaces as separators between cell tokens. Tests cover mixed separators and uneven rows with tab-separated cells. ChangesGrid Area Whitespace Handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The grid-area parser now accepts tab and repeated-space separators, preventing false uneven-cell-count reports for valid templates. No current merge-readiness risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| /** | ||
| * Regular expression to match sequences of CSS whitespace | ||
| */ | ||
| const cssWhitespace = /[\t\n ]+/u; |
There was a problem hiding this comment.
| const cssWhitespace = /[\t\n ]+/u; | |
| const cssWhitespace = /[\t ]+/u; |
CSS in general allows newlines as whitespace but not inside strings (Example)
There was a problem hiding this comment.
Thanks for pointing this out :) (https://regexr.com/8ocse)
I've removed \n from the pattern. ea057db
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request?
grid-template-areas.unevenGridAreaerror.What changes did you make? (Give an overview)
/[\t\n ]+/uregular expression to match sequences of CSS whitespace.grid-template-areasrows to split on CSS whitespace instead of literal spaces.Related Issues
fixes #537
Is there anything you'd like reviewers to focus on?
Summary by CodeRabbit
Bug Fixes
Tests