Skip to content

Commit

Permalink
Added jinja2 HTML compression
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulAuctioneer committed Jun 1, 2013
1 parent dd7feaf commit 6fb5f02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jinja2htmlcompress.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def normalize(self, ctx):
def write_data(value):
if not self.is_isolated(ctx.stack):
if not re.match(r'.+\w\s$', value):
value = value.strip()
if value[-2:] == " ":
value = value.strip()
value = _ws_normalize_re.sub(' ', value)
buffer.append(value)

Expand Down

0 comments on commit 6fb5f02

Please sign in to comment.