Skip to content

Commit df144b2

Browse files
authored
Merge pull request #2393 from mgreter/bugfix/issue-2359
Skip comment evaluation for compressed output (#2359)
2 parents f6b58d6 + 60378a0 commit df144b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/expand.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,11 @@ namespace Sass {
382382

383383
Statement_Ptr Expand::operator()(Comment_Ptr c)
384384
{
385+
if (ctx.output_style() == COMPRESSED) {
386+
// comments should not be evaluated in compact
387+
// https://github.com/sass/libsass/issues/2359
388+
if (!c->is_important()) return NULL;
389+
}
385390
eval.is_in_comment = true;
386391
Comment_Ptr rv = SASS_MEMORY_NEW(Comment, c->pstate(), Cast<String>(c->text()->perform(&eval)), c->is_important());
387392
eval.is_in_comment = false;

0 commit comments

Comments
 (0)