Commit 82051828 by Aaron Leung

Adding a helpful comment.

parent 242e7bed
...@@ -12,6 +12,7 @@ namespace Sass { ...@@ -12,6 +12,7 @@ namespace Sass {
void Node::flatten() void Node::flatten()
{ {
if (type() != block && type() != expansion && type() != root) return; if (type() != block && type() != expansion && type() != root) return;
// size can change during flattening, so we need to call size() on each pass
for (size_t i = 0; i < size(); ++i) { for (size_t i = 0; i < size(); ++i) {
if (at(i).type() == expansion) { if (at(i).type() == expansion) {
Node expn(at(i)); Node expn(at(i));
......
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