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

[CLEANUP] Move CSS comment removal to separate method #728

Merged
merged 1 commit into from
Sep 28, 2019

Conversation

JakeQZ
Copy link
Contributor

@JakeQZ JakeQZ commented Sep 28, 2019

The proposed solution in #334 for retaining @import rules has a flaw: it may
keep such rules that were commented-out.

By separating out the comment removal from other CSS parsing, we can avoid that
pitfall.

Also optimized the regex for CSS comments by unfolding and using possessive
quantifiers, potentially avoiding catastrophic failure.

Part of #338.

The proposed solution in #334 for retaining `@import` rules has a flaw: it may
keep such rules that were commented-out.

By separating out the comment removal from other CSS parsing, we can avoid that
pitfall.

Also optimized the regex for CSS comments by unfolding and using possessive
quantifiers, potentially avoiding catastrophic failure.

Part of #338.
@JakeQZ JakeQZ added the cleanup label Sep 28, 2019
@JakeQZ JakeQZ added this to the 3.0.0 milestone Sep 28, 2019
@JakeQZ JakeQZ self-assigned this Sep 28, 2019
@oliverklee oliverklee merged commit fc66ed1 into master Sep 28, 2019
@oliverklee oliverklee deleted the cleanup/comment-removal branch September 28, 2019 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants