]> xmof Git - DeDRM.git/commitdiff
Another Python 3 fix
authorAldo Bleeker <mail@ableeker.demon.nl>
Mon, 5 Apr 2021 15:06:24 +0000 (17:06 +0200)
committerAldo Bleeker <mail@ableeker.demon.nl>
Mon, 5 Apr 2021 15:06:24 +0000 (17:06 +0200)
DeDRM_plugin/flatxml2html.py

index 45e69497706fcb84700020196265afdc24c110ed..2fe80c360fb9cac5e8d46782e50412c4af306605 100644 (file)
@@ -770,10 +770,10 @@ class DocParser(object):
                             first_para_continued = False
                         (pclass, pdesc) = self.getParaDescription(start,end, regtype)
                         if not pclass:
-                            if orig_regtype.endswith(b'.right')     : pclass = 'cl-right'
-                            elif orig_regtype.endswith(b'.center')  : pclass = 'cl-center'
-                            elif orig_regtype.endswith(b'.left')    : pclass = 'cl-left'
-                            elif orig_regtype.endswith(b'.justify') : pclass = 'cl-justify'
+                            if orig_regtype.endswith(b'.right')     : pclass = b'cl-right'
+                            elif orig_regtype.endswith(b'.center')  : pclass = b'cl-center'
+                            elif orig_regtype.endswith(b'.left')    : pclass = b'cl-left'
+                            elif orig_regtype.endswith(b'.justify') : pclass = b'cl-justify'
                         if pclass and (ptype == 'full') and (len(pclass) >= 6):
                             tag = 'p'
                             if pclass[3:6] == b'h1-' : tag = 'h4'