mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 03:44:07 +02:00
Show text content of bad links.
This commit is contained in:
parent
7dab149a55
commit
893863a670
1 changed files with 4 additions and 1 deletions
|
|
@ -260,6 +260,8 @@ def __init__(self, book, fonts, options, logger, paths):
|
|||
self.link_level += 1
|
||||
paths = [link['path'] for link in self.links]
|
||||
|
||||
|
||||
|
||||
for text, tb in self.extra_toc_entries:
|
||||
ascii_text = text.encode('ascii', 'ignore')
|
||||
self.book.addTocEntry(ascii_text, tb)
|
||||
|
|
@ -1301,8 +1303,9 @@ def parse_tag(self, tag, parent_css):
|
|||
key = 'name' if tag.has_key('name') else 'id'
|
||||
self.targets[self.target_prefix+tag[key]] = self.current_block
|
||||
self.current_block.must_append = True
|
||||
elif not urlparse(tag['href'])[0]:
|
||||
else:
|
||||
self.logger.warn('Could not follow link to '+tag['href'])
|
||||
self.process_children(tag, tag_css, tag_pseudo_css)
|
||||
elif tag.has_key('name') or tag.has_key('id'):
|
||||
self.process_anchor(tag, tag_css, tag_pseudo_css)
|
||||
elif tagname == 'img':
|
||||
|
|
|
|||
Loading…
Reference in a new issue