comparison piecrust/templating/jinjaengine.py @ 288:078e64dba77d

jinja: Fix Twig compatibility for block trimming.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 05 Mar 2015 00:26:37 -0800
parents 1163bd034dc5
children d013cc191922
comparison
equal deleted inserted replaced
287:7081a5f88e10 288:078e64dba77d
124 if val is not None: 124 if val is not None:
125 kwargs.setdefault(name, val) 125 kwargs.setdefault(name, val)
126 126
127 # Twig trims blocks. 127 # Twig trims blocks.
128 if twig_compatibility_mode is True: 128 if twig_compatibility_mode is True:
129 self.trim_blocks = True 129 kwargs['trim_blocks'] = True
130 130
131 # All good! Create the Environment. 131 # All good! Create the Environment.
132 super(PieCrustEnvironment, self).__init__(*args, **kwargs) 132 super(PieCrustEnvironment, self).__init__(*args, **kwargs)
133 133
134 # Now add globals and filters. 134 # Now add globals and filters.