]> Devi Nivas Git - chevron.git/commitdiff
Fixed partial scoping
authornoah morrison <noah@morrison.ph>
Tue, 11 Nov 2014 00:49:11 +0000 (19:49 -0500)
committernoah morrison <noah@morrison.ph>
Tue, 11 Nov 2014 02:13:00 +0000 (21:13 -0500)
partials would not get their parent's partial detials
(partials_path, partials_ext, partials_dict)

entei.py

index 06fcef41681dc9e2055142ef356d6ce998a8f675..494792279c2ae89cb61119b5af810d8c5f488a31 100755 (executable)
--- a/entei.py
+++ b/entei.py
@@ -211,7 +211,9 @@ def render(template, data, partials_path='.', partials_ext='mustache',
     else:
         tokens = tokenize(template)
 
+
     output = ''
+
     if type(data) is list:
         scopes = data
     else:
@@ -262,7 +264,8 @@ def render(template, data, partials_path='.', partials_ext='mustache',
 
         elif tag == 'partial':
             partial = get_partial(key)
-            output += render(partial, scopes)
+            output += render(partial, scopes, partials_path,
+                             partials_ext, partials_dict)
 
         else:
             print('>>', tag)