mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-21 09:13:02 +02:00
Reverted incorrect branch change
This commit is contained in:
parent
11c6b0a44d
commit
bc6f3ab5de
1 changed files with 1 additions and 6 deletions
|
|
@ -222,7 +222,6 @@ def __init__(self, book, fonts, options, logger, paths):
|
|||
self.memory = [] #: Used to ensure that duplicate CSS unhandled erros are not reported
|
||||
self.tops = {} #: element representing the top of each HTML file in the LRF file
|
||||
self.previous_text = '' #: Used to figure out when to lstrip
|
||||
self.stripped_space = ''
|
||||
self.preserve_block_style = False #: Used so that <p> tags in <blockquote> elements are handled properly
|
||||
self.avoid_page_break = False
|
||||
self.current_page = book.create_page()
|
||||
|
|
@ -865,15 +864,11 @@ def append_text(src):
|
|||
|
||||
if collapse_whitespace:
|
||||
src = re.sub(r'\s{1,}', ' ', src)
|
||||
if self.stripped_space and len(src) == len(src.lstrip(u' \n\r\t')):
|
||||
src = self.stripped_space + src
|
||||
src, orig = src.rstrip(u' \n\r\t'), src
|
||||
self.stripped_space = orig[len(src):]
|
||||
if len(self.previous_text) != len(self.previous_text.rstrip(u' \n\r\t')):
|
||||
src = src.lstrip(u' \n\r\t')
|
||||
if len(src):
|
||||
self.previous_text = src
|
||||
append_text(src)
|
||||
append_text(src)
|
||||
else:
|
||||
srcs = src.split('\n')
|
||||
for src in srcs[:-1]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue