FB2 Output: Fix bug where <empty-line/> elements were put inside <p> tags.

This commit is contained in:
John Schember 2011-03-10 20:44:36 -05:00
parent b58cd26fa1
commit 6d0739ed1a

View File

@ -72,7 +72,7 @@ class FB2MLizer(object):
def clean_text(self, text):
# Condense empty paragraphs into a line break.
text = re.sub(r'(?miu)(<p>\s*</p>\s*){3,}', '<p><empty-line /></p>', text)
text = re.sub(r'(?miu)(<p>\s*</p>\s*){3,}', '<empty-line />', text)
# Remove empty paragraphs.
text = re.sub(r'(?miu)<p>\s*</p>', '', text)
# Clean up pargraph endings.