Skip to content

Commit 39cbc08

Browse files
committed
Skip comment evaluation for compressed output (#2359)
Fixes #2359
1 parent 344d6d1 commit 39cbc08

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)