mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix #161
This commit is contained in:
parent
f8a03f318d
commit
1a3c375a65
@ -1287,6 +1287,7 @@ class HTMLConverter(object):
|
|||||||
self.unused_target_blocks.append(target)
|
self.unused_target_blocks.append(target)
|
||||||
else:
|
else:
|
||||||
self.targets[tkey] = self.current_block
|
self.targets[tkey] = self.current_block
|
||||||
|
self.current_block.must_append = True
|
||||||
src = self.get_text(tag, limit=1000)
|
src = self.get_text(tag, limit=1000)
|
||||||
if not self.disable_chapter_detection and tagname.startswith('h'):
|
if not self.disable_chapter_detection and tagname.startswith('h'):
|
||||||
if self.chapter_regex.search(src):
|
if self.chapter_regex.search(src):
|
||||||
@ -1366,7 +1367,7 @@ class HTMLConverter(object):
|
|||||||
|
|
||||||
def remove_unused_target_blocks(self):
|
def remove_unused_target_blocks(self):
|
||||||
for block in self.unused_target_blocks:
|
for block in self.unused_target_blocks:
|
||||||
block.parent.contents.remove(block)
|
block.parent.contents.remove(block)
|
||||||
block.parent = None
|
block.parent = None
|
||||||
|
|
||||||
def writeto(self, path, lrs=False):
|
def writeto(self, path, lrs=False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user