pep8 and other code-style changes
[librarian.git] / librarian / epub.py
index 1ea2688..bf2d4d9 100644 (file)
@@ -501,6 +501,9 @@ def transform(wldoc, verbose=False,
         for flag in flags:
             document.edoc.getroot().set(flag, 'yes')
 
+    document.clean_ed_note()
+    document.clean_ed_note('abstrakt')
+
     # add editors info
     editors = document.editors()
     if editors:
@@ -520,6 +523,8 @@ def transform(wldoc, verbose=False,
     output_file = NamedTemporaryFile(prefix='librarian', suffix='.epub', delete=False)
     zip = zipfile.ZipFile(output_file, 'w', zipfile.ZIP_DEFLATED)
 
+    functions.reg_mathml_epub(zip)
+
     # write static elements
     mime = zipfile.ZipInfo()
     mime.filename = 'mimetype'
@@ -641,7 +646,7 @@ def transform(wldoc, verbose=False,
                 '"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
     ))
 
-    if not flags or not 'without-fonts' in flags:
+    if not flags or 'without-fonts' not in flags:
         # strip fonts
         tmpdir = mkdtemp('-librarian-epub')
         try: