Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiline comment start #80

Merged
merged 2 commits into from
Jul 21, 2014
Merged

Conversation

JohnAlbin
Copy link
Contributor

Over in #24, @mscheibe noted that:

Compass Sprite imports can be of the form @import "folder/*.png". This matches the regex for multi-line comments and the rest of the file would then be ignored.

Looking at this more closely, I see that other, similar strings can cause the same failure:

  • .rule { content: "/*"; }
  • /* A multi-line comment on a single line */

Properly parsing CSS strings and comments is a difficult task. Fortunately, the KSS spec implies that we only should care about clean multi-line comments that start and end on their own lines. This is much easier to match with regex.

JohnAlbin added a commit that referenced this pull request Jul 21, 2014
@JohnAlbin JohnAlbin merged commit 2f8f170 into master Jul 21, 2014
@JohnAlbin JohnAlbin added this to the 1.0.0 milestone Jul 21, 2014
@JohnAlbin JohnAlbin deleted the fix-multiline-comment-start branch July 22, 2014 15:18
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.

None yet

1 participant