From e748ee34f9236b2c9f537ce56d94a978110fa232 Mon Sep 17 00:00:00 2001 From: noah morrison Date: Mon, 10 Nov 2014 20:01:30 -0500 Subject: [PATCH] Fixed falsy scopes exiting prematurely --- entei.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/entei.py b/entei.py index 9eeb45e..210491c 100755 --- 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 -- 2.47.3