Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Sep 29, 2015
1 parent a2c2084 commit fd08864
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nikola/filters.py
Expand Up @@ -315,13 +315,15 @@ def jsonminify(data):
data = json.dumps(json.loads(data), indent=None, separators=(',', ':'))
return data


@apply_to_binary_file
def xmlminify(data):
"""Minify XML files (strip whitespace and use minimal separators)."""
parser = lxml.etree.XMLParser(remove_blank_text=True)
newdata = lxml.etree.XML(data, parser=parser)
return lxml.etree.tostring(newdata, encoding='utf-8', method='xml', xml_declaration=True)


def _normalize_html(data):
"""Pass HTML through LXML to clean it up, if possible."""
try:
Expand Down

0 comments on commit fd08864

Please sign in to comment.