]> Devi Nivas Git - chevron.git/commitdiff
Fixed falsy scopes exiting prematurely
authornoah morrison <noah@morrison.ph>
Tue, 11 Nov 2014 01:01:30 +0000 (20:01 -0500)
committernoah morrison <noah@morrison.ph>
Tue, 11 Nov 2014 02:13:00 +0000 (21:13 -0500)
entei.py

index 9eeb45e0d6b4a27a850266399347d69ffab4b054..210491c6fa4d759450f0cf06a1a62406fc3e720f 100755 (executable)
--- a/entei.py
+++ b/entei.py
@@ -232,7 +232,11 @@ def render(template, data, partials_path='.', partials_ext='mustache',
             scopes = scopes[1:]
 
         elif not current_scope and len(scopes) != 1:
-            pass
+            if tag == 'section':
+                scopes.insert(0, scope)
+
+            elif tag == 'inverted section':
+                scopes.insert(0, not scope)
 
         elif tag == 'literal':
             output += key