mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-03 19:03:35 +01:00
...
This commit is contained in:
commit
ca19c14dfb
1 changed files with 3 additions and 2 deletions
|
|
@ -91,8 +91,9 @@ def fb2mlize_spine(self):
|
|||
return u'<?xml version="1.0" encoding="UTF-8"?>\n%s' % etree.tostring(etree.fromstring(output), encoding=unicode, pretty_print=True)
|
||||
|
||||
def clean_text(self, text):
|
||||
text = re.sub(r'<p>\s*</p>', '', text)
|
||||
|
||||
text = re.sub(r'(?miu)<p>\s*</p>', '', text)
|
||||
text = re.sub(r'(?miu)\s+</p>', '</p>', text)
|
||||
text = re.sub(r'(?miu)</p><p>', '</p>\n\n<p>', text)
|
||||
return text
|
||||
|
||||
def fb2_header(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue