From 76ac2d42c3ed3d4ffffa4695b4d44dd5968b72a9 Mon Sep 17 00:00:00 2001 From: "Eevee (Alex Munroe)" Date: Thu, 28 Aug 2014 17:23:17 -0700 Subject: Fix CSS rendering to understand seeing the same ancestry twice. --- scss/compiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scss/compiler.py b/scss/compiler.py index f7fd22b..9b29eb2 100644 --- a/scss/compiler.py +++ b/scss/compiler.py @@ -1709,11 +1709,12 @@ class Compilation(object): nesting += 1 ancestry_len = len(ancestry) - first_mismatch = 0 for i, (old_header, new_header) in enumerate(zip(prev_ancestry_headers, ancestry.headers)): if old_header != new_header: first_mismatch = i break + else: + first_mismatch = min(ancestry_len, len(prev_ancestry_headers)) # When sc is False, sets of properties are printed without a # trailing semicolon. If the previous block isn't being closed, -- cgit v1.2.1