diff --git a/constants.py b/constants.py index dc185eb..bd35546 100644 --- a/constants.py +++ b/constants.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -CSS = '''body { margin-left: 5%; margin-right: 5%; margin-top: 5%; margin-bottom: 5%; text-align: justify; } +CSS = '''body { margin-left: 2%; margin-right: 2%; margin-top: 2%; margin-bottom: 2%; text-align: justify; } pre { font-size: x-small; } sml { font-size: small; } h1 { text-align: center; } diff --git a/output.py b/output.py index e028237..a320a42 100644 --- a/output.py +++ b/output.py @@ -243,8 +243,8 @@ class EPubFanficWriter(FanficWriter): else: description = str(description) if description is not None and len(description) > 0: - description = description.replace ('\\\'', '').replace('\\\"', '') - description = removeEntities(description.replace(' ',' ').replace('’','')) + description = description.replace ('\\', '\'').replace('\\\"', '\"') + description = removeEntities(description) else: description = ' ' @@ -336,12 +336,11 @@ class EPubFanficWriter(FanficWriter): def unirepl(match): "Return the unicode string for a decimal number" - s = match.group() - if s[2].lower()=='x': + if match.group(1)=='x': radix=16 else: radix=10 - value = int(s[3:-1], radix ) + value = int(match.group(2), radix ) return unichr(value) def replaceNumberEntities(data):