Skip to content

Commit

Permalink
Merge pull request #2281 from xzyfer/list-equality
Browse files Browse the repository at this point in the history
Update list equality to take is_bracketed into account
  • Loading branch information
xzyfer committed Jan 5, 2017
2 parents 6537833 + 641e6cf commit 7abaa75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ast.cpp
Expand Up @@ -2225,6 +2225,7 @@ namespace Sass {
if (List_Ptr_Const r = dynamic_cast<List_Ptr_Const>(&rhs)) {
if (length() != r->length()) return false;
if (separator() != r->separator()) return false;
if (is_bracketed() != r->is_bracketed()) return false;
for (size_t i = 0, L = length(); i < L; ++i) {
Expression_Obj rv = r->at(i);
Expression_Obj lv = this->at(i);
Expand Down
1 change: 1 addition & 0 deletions src/ast.hpp
Expand Up @@ -1082,6 +1082,7 @@ namespace Sass {
{
if (hash_ == 0) {
hash_ = std::hash<std::string>()(sep_string());
hash_combine(hash_, std::hash<bool>()(is_bracketed()));
for (size_t i = 0, L = length(); i < L; ++i)
hash_combine(hash_, (elements()[i])->hash());
}
Expand Down

0 comments on commit 7abaa75

Please sign in to comment.