diff options
author | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2014-08-28 17:23:17 -0700 |
---|---|---|
committer | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2014-09-01 21:30:57 -0700 |
commit | 76ac2d42c3ed3d4ffffa4695b4d44dd5968b72a9 (patch) | |
tree | 1a05020517515479cba05a9a8d6ce5818b495328 | |
parent | 64bfd802044df80b89453b8532320d2b242b071a (diff) | |
download | pyscss-76ac2d42c3ed3d4ffffa4695b4d44dd5968b72a9.tar.gz |
Fix CSS rendering to understand seeing the same ancestry twice.
-rw-r--r-- | scss/compiler.py | 3 |
1 files changed, 2 insertions, 1 deletions
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, |