HTMLZ: metadata replace metadata after merging. APNX don't use tag starting with d as paragraph tag as it breaks more than it fixes.

This commit is contained in:
John Schember 2011-05-05 06:49:36 -04:00
parent 6fbb996d2a
commit e101896e57
2 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ class APNXBuilder(object):
if c == '/': if c == '/':
closing = True closing = True
continue continue
elif c in ('d', 'p'): elif c == 'p':
if closing: if closing:
in_p = False in_p = False
else: else:

View File

@ -70,7 +70,7 @@ def set_metadata(stream, mi):
# Update the metadata. # Update the metadata.
old_mi = opf.to_book_metadata() old_mi = opf.to_book_metadata()
old_mi.smart_update(mi) old_mi.smart_update(mi)
opf.smart_update(metadata_to_opf(old_mi)) opf.smart_update(metadata_to_opf(old_mi), replace_metadata=True)
newopf = StringIO(opf.render()) newopf = StringIO(opf.render())
safe_replace(stream, opf_path, newopf, extra_replacements=replacements, add_missing=True) safe_replace(stream, opf_path, newopf, extra_replacements=replacements, add_missing=True)