Keep the idiotic epubcheck happy.

This commit is contained in:
Kovid Goyal 2013-06-14 07:46:38 +05:30
parent 9250cc4a0d
commit bc0c8df175
2 changed files with 4 additions and 6 deletions

View File

@ -134,8 +134,7 @@ class Images(object):
if rid in self.rid_map: if rid in self.rid_map:
src = self.generate_filename(rid, name) src = self.generate_filename(rid, name)
img = IMG(src='images/%s' % src) img = IMG(src='images/%s' % src)
if alt: img.set('alt', alt or 'Image')
img.set('alt', alt)
return img return img
def drawing_to_html(self, drawing, page): def drawing_to_html(self, drawing, page):
@ -167,8 +166,7 @@ class Images(object):
src = self.generate_filename(rid) src = self.generate_filename(rid)
img = IMG(src='images/%s' % src, style="display:block") img = IMG(src='images/%s' % src, style="display:block")
alt = get(imagedata, 'o:title') alt = get(imagedata, 'o:title')
if alt: img.set('alt', alt or 'Image')
img.set('alt', alt)
yield img yield img
def get_float_properties(self, anchor, style, page): def get_float_properties(self, anchor, style, page):

View File

@ -420,9 +420,9 @@ class Convert(object):
if anchor and anchor in self.anchor_map: if anchor and anchor in self.anchor_map:
span.set('href', '#' + self.anchor_map[anchor]) span.set('href', '#' + self.anchor_map[anchor])
continue 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)) (rid, anchor))
span.set('href', '#') # span.set('href', '#')
def convert_run(self, run): def convert_run(self, run):
ans = SPAN() ans = SPAN()