mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #91
This commit is contained in:
parent
4e04b48d12
commit
166485b9a5
@ -959,9 +959,12 @@ class HTMLConverter(object):
|
|||||||
elif tagname == 'pre':
|
elif tagname == 'pre':
|
||||||
self.end_current_para()
|
self.end_current_para()
|
||||||
self.current_block.append_to(self.current_page)
|
self.current_block.append_to(self.current_page)
|
||||||
|
attrs = Span.translate_attrs(tag_css, self.font_delta, self.memory)
|
||||||
|
ts = self.book.create_text_style(**self.unindented_style.attrs)
|
||||||
|
ts.attrs.update(attrs)
|
||||||
self.current_block = self.book.create_text_block(
|
self.current_block = self.book.create_text_block(
|
||||||
blockStyle=self.current_block.blockStyle,
|
blockStyle=self.current_block.blockStyle,
|
||||||
textStyle=self.unindented_style)
|
textStyle=ts)
|
||||||
src = ''.join([str(i) for i in tag.contents])
|
src = ''.join([str(i) for i in tag.contents])
|
||||||
lines = src.split('\n')
|
lines = src.split('\n')
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user