diff --git a/src/calibre/ebooks/pml/pmlconverter.py b/src/calibre/ebooks/pml/pmlconverter.py index c72a21a5f9..7133e3f251 100644 --- a/src/calibre/ebooks/pml/pmlconverter.py +++ b/src/calibre/ebooks/pml/pmlconverter.py @@ -41,14 +41,14 @@ PML_HTML_RULES = [ (re.compile(r'\\q="(?P#.+?)"(?P.*?)\\q', re.DOTALL), lambda match: '%s' % (match.group('target'), match.group('text')) if match.group('text') else ''), (re.compile(r'\\Q="(?P.+?)"'), lambda match: '' % match.group('target')), (re.compile(r'\\-'), lambda match: ''), - (re.compile(r'\\Fn="(?P.+?)"(?P.*?)\\Fn'), lambda match: '%s' % (match.group('target'), match.group('text')) if match.group('text') else ''), - (re.compile(r'\\Sd="(?P.+?)"(?P.*?)\\Sd'), lambda match: '%s' % (match.group('target'), match.group('text')) if match.group('text') else ''), + (re.compile(r'\\Fn="(?P.+?)"(?P.*?)\\Fn'), lambda match: '%s' % (match.group('target'), match.group('text')) if match.group('text') else ''), + (re.compile(r'\\Sd="(?P.+?)"(?P.*?)\\Sd'), lambda match: '%s' % (match.group('target'), match.group('text')) if match.group('text') else ''), # Just italicize index items as that is how the eReader software renders them. (re.compile(r'\\I(?P.*?)\\I', re.DOTALL), lambda match: '%s' % match.group('text') if match.group('text') else ''), # Sidebar and Footnotes - (re.compile(r'.+?)">\s*(?P.*?)\s*', re.DOTALL), lambda match: '' % (match.group('target'), match.group('text')) if match.group('text') else ''), - (re.compile(r'.+?)">\s*(?P.*?)\s*', re.DOTALL), lambda match: '
%s
' % (match.group('target'), match.group('text')) if match.group('text') else ''), + (re.compile(r'.+?)">\s*(?P.*?)\s*', re.DOTALL), lambda match: '
%s
' % (match.group('target'), match.group('text')) if match.group('text') else ''), + (re.compile(r'.+?)">\s*(?P.*?)\s*', re.DOTALL), lambda match: '
%s
' % (match.group('target'), match.group('text')) if match.group('text') else ''), # eReader files are one paragraph per line. # This forces the lines to wrap properly. @@ -80,5 +80,5 @@ def pml_to_html(pml): def footnote_sidebar_to_html(id, pml): if id.startswith('\x01'): id = id[2:] - html = '
%s
' % (id, id, pml_to_html(pml)) + html = '
%s
%s
' % (id, id, pml_to_html(pml)) return html