Skip to content

fix: skip comments when scanning block boundaries - #2

Merged
boidushya merged 1 commit into
masterfrom
fix/block-comment-boundaries
Sep 1, 2026
Merged

fix: skip comments when scanning block boundaries#2
boidushya merged 1 commit into
masterfrom
fix/block-comment-boundaries

Conversation

@boidushya

Copy link
Copy Markdown
Member

Overview

Comments inside an @if, @mixin, @for, or @each block used to break block detection. The scanner that finds the closing brace tracked braces and quotes straight through comment text, so a plain apostrophe like "it's" or a stray brace in a comment threw off the count. That showed up as a bogus UNCLOSED_BLOCK error on well-formed CSS, or worse, quietly dropped rules. Now it skips over /* */ and // comments before counting, and the same blind spot in value scanning is fixed too. Comment text is left untouched.

Closes #1.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
rics Ready Ready Preview Sep 1, 2026 9:51am UTC

@boidushya
boidushya merged commit 2fbeb38 into master Sep 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude - @if/@mixin/@for/@each block-boundary detection breaks on comments containing an apostrophe or brace

1 participant