Strip extra whitespace and newlines from SQS response templates.
Fixes #623
This commit is contained in:
parent
4372c346d9
commit
68eeb5948b
3 changed files with 18 additions and 31 deletions
|
|
@ -81,7 +81,8 @@ class _TemplateEnvironmentMixin(object):
|
|||
template_id = id(source)
|
||||
if not self.contains_template(template_id):
|
||||
self.loader.update({template_id: source})
|
||||
self.environment = Environment(loader=self.loader, autoescape=self.should_autoescape)
|
||||
self.environment = Environment(loader=self.loader, autoescape=self.should_autoescape, trim_blocks=True,
|
||||
lstrip_blocks=True)
|
||||
return self.environment.get_template(template_id)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue