Skip to content
Permalink
Browse files
flake8
  • Loading branch information
da2x committed Sep 29, 2015
1 parent a2c2084 commit fd08864c0a109b96e595d6c775e72179719f824c
Showing with 2 additions and 0 deletions.
  1. +2 −0 nikola/filters.py
@@ -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:

0 comments on commit fd08864

Please sign in to comment.