From: noah morrison Date: Wed, 12 Nov 2014 02:44:22 +0000 (-0500) Subject: Fixed partial standalones X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=78501877b197e44edf37a46bb7246e32998d41be;p=chevron.git Fixed partial standalones Partial standalone tags do not have the whitespace stripped from them --- diff --git a/entei.py b/entei.py index 3e9872a..6de10d4 100755 --- 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