mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Keep the idiotic epubcheck happy.
This commit is contained in:
parent
9250cc4a0d
commit
bc0c8df175
@ -134,8 +134,7 @@ class Images(object):
|
||||
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 @@ class Images(object):
|
||||
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 @@ class Convert(object):
|
||||
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…
x
Reference in New Issue
Block a user