Skip to content

Commit

Permalink
Merge pull request #1247 from xzyfer/fix/string-comparisions
Browse files Browse the repository at this point in the history
Fix comparision of double quoted strings
  • Loading branch information
xzyfer committed May 28, 2015
2 parents 38a4ba2 + 3deefdf commit 3672661
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,10 @@ namespace Sass {
} break;

case Expression::STRING: {
return unquote(static_cast<String_Constant*>(lhs)->value()) ==
unquote(static_cast<String_Constant*>(rhs)->value());
string slhs = static_cast<String_Quoted*>(lhs)->value();
string srhs = static_cast<String_Quoted*>(rhs)->value();
return unquote(slhs) == unquote(srhs) &&
(!(is_quoted(slhs) || is_quoted(srhs)) || slhs[0] == srhs[0]);
} break;

case Expression::LIST: {
Expand Down

0 comments on commit 3672661

Please sign in to comment.