Commit f02faf72 by Aaron Leung

Fixing discrepancies in the output for concatenated strings inside of identifier schemata.

parent 24687882
......@@ -221,7 +221,7 @@ namespace Sass {
bool operator>(Node rhs) const;
bool operator>=(Node rhs) const;
string to_string() const;
string to_string(Type inside_of = none) const;
void emit_nested_css(stringstream& buf, size_t depth, bool at_toplevel = false, bool in_media_query = false);
void emit_propset(stringstream& buf, size_t depth, const string& prefix);
void echo(stringstream& buf, size_t depth = 0);
......
......@@ -15,7 +15,7 @@ using std::endl;
namespace Sass {
string Node::to_string() const
string Node::to_string(Type inside_of) const
{
switch (type())
{
......@@ -110,7 +110,7 @@ namespace Sass {
} break;
case rule: {
string result(at(0).to_string());
string result(at(0).to_string(property));
result += ": ";
result += at(1).to_string();
return result;
......@@ -304,7 +304,7 @@ namespace Sass {
result += at(i).token().unquote();
}
else {
result += at(i).to_string();
result += at(i).to_string(identifier_schema);
}
}
return result;
......@@ -329,7 +329,8 @@ namespace Sass {
for (size_t i = 0, S = size(); i < S; ++i) {
result += at(i).to_string().substr(1, at(i).token().length()-2);
}
return "\"" + result + "\"";
if (inside_of == identifier_schema || inside_of == property) return result;
else return "\"" + result + "\"";
} break;
case warning: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment