ext/libsass/src/output.cpp in sassc-1.8.1 vs ext/libsass/src/output.cpp in sassc-1.8.2

- old
+ new

@@ -72,11 +72,11 @@ // search for unicode char for(const char& chr : wbuf.buffer) { // skip all ascii chars if (chr >= 0) continue; // declare the charset - if (output_style() != COMPRESSED) + if (output_style() != SASS_STYLE_COMPRESSED) charset = "@charset \"UTF-8\";" + ctx->linefeed; else charset = "\xEF\xBB\xBF"; // abort search break; @@ -93,11 +93,11 @@ { To_String to_string(ctx); std::string txt = c->text()->perform(&to_string); // if (indentation && txt == "/**/") return; bool important = c->is_important(); - if (output_style() != COMPRESSED || important) { + if (output_style() != SASS_STYLE_COMPRESSED || important) { if (buffer().size() == 0) { top_nodes.push_back(c); } else { in_comment = true; append_indentation(); @@ -129,15 +129,15 @@ return; } if (b->has_non_hoistable()) { decls = true; - if (output_style() == NESTED) indentation += r->tabs(); - if (ctx && ctx->source_comments) { + if (output_style() == SASS_STYLE_NESTED) indentation += r->tabs(); + if (ctx && ctx->c_options->source_comments) { std::stringstream ss; append_indentation(); - ss << "/* line " << r->pstate().line+1 << ", " << r->pstate().path << " */"; + ss << "/* line " << r->pstate().line + 1 << ", " << r->pstate().path << " */"; append_string(ss.str()); append_optional_linefeed(); } s->perform(this); append_scope_opener(b); @@ -169,11 +169,11 @@ // Print if OK if (!stm->is_hoistable() && bPrintExpression) { stm->perform(this); } } - if (output_style() == NESTED) indentation -= r->tabs(); + if (output_style() == SASS_STYLE_NESTED) indentation -= r->tabs(); append_scope_closer(b); } if (b->has_hoistable()) { if (decls) ++indentation; @@ -236,11 +236,11 @@ } } return; } - if (output_style() == NESTED) indentation += f->tabs(); + if (output_style() == SASS_STYLE_NESTED) indentation += f->tabs(); append_indentation(); append_token("@supports", f); append_mandatory_space(); c->perform(this); append_scope_opener(); @@ -272,11 +272,11 @@ stm->perform(this); if (i < L - 1) append_special_linefeed(); } } - if (output_style() == NESTED) indentation -= f->tabs(); + if (output_style() == SASS_STYLE_NESTED) indentation -= f->tabs(); append_scope_closer(); } @@ -295,11 +295,11 @@ stm->perform(this); } } return; } - if (output_style() == NESTED) indentation += m->tabs(); + if (output_style() == SASS_STYLE_NESTED) indentation += m->tabs(); append_indentation(); append_token("@media", m); append_mandatory_space(); in_media_block = true; q->perform(this); @@ -309,11 +309,11 @@ for (size_t i = 0, L = b->length(); i < L; ++i) { if ((*b)[i]) (*b)[i]->perform(this); if (i < L - 1) append_special_linefeed(); } - if (output_style() == NESTED) indentation -= m->tabs(); + if (output_style() == SASS_STYLE_NESTED) indentation -= m->tabs(); append_scope_closer(); } void Output::operator()(At_Rule* a) { @@ -378,10 +378,10 @@ } void Output::operator()(String_Constant* s) { std::string value(s->value()); - if (s->can_compress_whitespace() && output_style() == COMPRESSED) { + if (s->can_compress_whitespace() && output_style() == SASS_STYLE_COMPRESSED) { value.erase(std::remove_if(value.begin(), value.end(), ::isspace), value.end()); } if (!in_comment) { append_token(string_to_output(value), s); } else {