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 { ...@@ -221,7 +221,7 @@ namespace Sass {
bool operator>(Node rhs) const; bool operator>(Node rhs) const;
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_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 emit_propset(stringstream& buf, size_t depth, const string& prefix);
void echo(stringstream& buf, size_t depth = 0); void echo(stringstream& buf, size_t depth = 0);
......
...@@ -15,7 +15,7 @@ using std::endl; ...@@ -15,7 +15,7 @@ using std::endl;
namespace Sass { namespace Sass {
string Node::to_string() const string Node::to_string(Type inside_of) const
{ {
switch (type()) switch (type())
{ {
...@@ -110,7 +110,7 @@ namespace Sass { ...@@ -110,7 +110,7 @@ namespace Sass {
} break; } break;
case rule: { case rule: {
string result(at(0).to_string()); string result(at(0).to_string(property));
result += ": "; result += ": ";
result += at(1).to_string(); result += at(1).to_string();
return result; return result;
...@@ -304,7 +304,7 @@ namespace Sass { ...@@ -304,7 +304,7 @@ namespace Sass {
result += at(i).token().unquote(); result += at(i).token().unquote();
} }
else { else {
result += at(i).to_string(); result += at(i).to_string(identifier_schema);
} }
} }
return result; return result;
...@@ -329,7 +329,8 @@ namespace Sass { ...@@ -329,7 +329,8 @@ namespace Sass {
for (size_t i = 0, S = size(); i < S; ++i) { for (size_t i = 0, S = size(); i < S; ++i) {
result += at(i).to_string().substr(1, at(i).token().length()-2); 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; } break;
case warning: { 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