Commit 2ac2924f by Aaron Leung

Fixing a bug in the flattener.

parent 4613579c
......@@ -13,7 +13,20 @@ namespace Sass {
void Node::flatten()
{
if (type() != block && type() != expansion && type() != root && type() != for_through_directive && type() != for_to_directive) return;
switch (type())
{
case block:
case expansion:
case root:
case for_through_directive:
case for_to_directive:
case each_directive:
case while_directive:
break;
default:
return;
}
// size can change during flattening, so we need to call size() on each pass
for (size_t i = 0; i < size(); ++i) {
switch (at(i).type())
......
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