mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book/Book polishing: Preserve the class attribute on the <html> tag in AZW3 format files. Fixes #1339055 [text layout changed from vertical to horizontal when using "Polish Books" feature](https://bugs.launchpad.net/calibre/+bug/1339055)
This commit is contained in:
parent
7d524da902
commit
a629e4b5a7
@ -218,6 +218,8 @@ class Chunker(object):
|
||||
# preceding layers should have removed svg and any other non html
|
||||
# namespaced tags.
|
||||
attrib = {'lang':lang} if lang else {}
|
||||
if 'class' in root.attrib:
|
||||
attrib['class'] = root.attrib['class']
|
||||
nroot = etree.Element('html', attrib=attrib)
|
||||
nroot.text = root.text
|
||||
nroot.tail = '\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user