mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 09:23:14 +02:00
Keep the idiotic epubcheck happy.
This commit is contained in:
parent
9250cc4a0d
commit
bc0c8df175
2 changed files with 4 additions and 6 deletions
|
|
@ -134,8 +134,7 @@ def pic_to_img(self, pic, alt=None):
|
|||
if rid in self.rid_map:
|
||||
src = self.generate_filename(rid, name)
|
||||
img = IMG(src='images/%s' % src)
|
||||
if alt:
|
||||
img.set('alt', alt)
|
||||
img.set('alt', alt or 'Image')
|
||||
return img
|
||||
|
||||
def drawing_to_html(self, drawing, page):
|
||||
|
|
@ -167,8 +166,7 @@ def pict_to_html(self, pict, page):
|
|||
src = self.generate_filename(rid)
|
||||
img = IMG(src='images/%s' % src, style="display:block")
|
||||
alt = get(imagedata, 'o:title')
|
||||
if alt:
|
||||
img.set('alt', alt)
|
||||
img.set('alt', alt or 'Image')
|
||||
yield img
|
||||
|
||||
def get_float_properties(self, anchor, style, page):
|
||||
|
|
|
|||
|
|
@ -420,9 +420,9 @@ def resolve_links(self, relationships_by_id):
|
|||
if anchor and anchor in self.anchor_map:
|
||||
span.set('href', '#' + self.anchor_map[anchor])
|
||||
continue
|
||||
self.log.warn('Hyperlink with unknown target (%s, %s), ignoring' %
|
||||
self.log.warn('Hyperlink with unknown target (rid=%s, anchor=%s), ignoring' %
|
||||
(rid, anchor))
|
||||
span.set('href', '#')
|
||||
# span.set('href', '#')
|
||||
|
||||
def convert_run(self, run):
|
||||
ans = SPAN()
|
||||
|
|
|
|||
Loading…
Reference in a new issue