aboutsummaryrefslogtreecommitdiff
path: root/mammoth/html_generation.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-01-25 19:23:05 +0000
committerMichael Williamson <mike@zwobble.org>2015-01-25 19:23:05 +0000
commit9305c48086f4c92b1c1f0096a8e1f947ece46d9d (patch)
tree78e9f4896bf1009d551d9b5b800c527d8bd974f5 /mammoth/html_generation.py
parenta360df2f5067e4ae125b5a897c934c4f21958a9f (diff)
Use unicode literals instead of Python version switching
Diffstat (limited to 'mammoth/html_generation.py')
-rw-r--r--mammoth/html_generation.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mammoth/html_generation.py b/mammoth/html_generation.py
index 32a0d62..f31b2d3 100644
--- a/mammoth/html_generation.py
+++ b/mammoth/html_generation.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
import cgi
import sys
@@ -48,7 +50,7 @@ class HtmlGenerator(object):
self._fragments.append(fragment)
def html_string(self):
- return u("").join(self._fragments)
+ return "".join(self._fragments)
class _Element(object):
@@ -109,9 +111,7 @@ def _generate_class_attribute(path_element):
if sys.version_info[0] == 2:
_iteritems = lambda x: x.iteritems()
- u = lambda value: unicode(value, "unicode_escape")
else:
_iteritems = lambda x: x.items()
- u = lambda value: value