]> Devi Nivas Git - chevron.git/commitdiff
Fixed partial standalones
authornoah morrison <noah@morrison.ph>
Wed, 12 Nov 2014 02:44:22 +0000 (21:44 -0500)
committernoah morrison <noah@morrison.ph>
Wed, 12 Nov 2014 14:27:58 +0000 (09:27 -0500)
Partial standalone tags do not have the whitespace stripped from them

entei.py

index 3e9872a7d5bd96fe6e1de1d0c028be856033aa2a..6de10d420af4afe935943a9ed5dfcfcd6d77777a 100755 (executable)
--- a/entei.py
+++ b/entei.py
@@ -117,9 +117,12 @@ def tokenize(template):
 
         if is_standalone and tag_type not in ['variable', 'no escape']:
             until = grab_literal('\n')
+
             if until.isspace() or until == '':
                 is_standalone = True
-                literal = literal.rstrip(' ')
+
+                if tag_type != 'partial':
+                    literal = literal.rstrip(' ')
 
             else:
                 is_standalone = False