Skip to content

Commented @import statements are not ignored #19

@ragol

Description

@ragol

Commented @import statement do not get skipped. It does not matter whether @import is located inside a block comment /* */ or in an inline comment //. The corresponding regular expression in https://github.com/unlight/gulp-cssimport/blob/master/gulp-cssimport.js#L50 does not check for comments.

For example:

// foo.scss:
// @import "bar.scss";
/*
@import "bar.scss";
*/

// bar.scss:
$x: 5px;

The issue can be solved by stripping comments before executing the parsing regular expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions