Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Feb 9, 2020
1 parent 2dd0272 commit 60797f8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sphinx/writers/html.py
Expand Up @@ -609,11 +609,7 @@ def visit_image(self, node: Element) -> None:
atts['height'] = int(atts['height']) * scale
atts['alt'] = node.get('alt', uri)
if 'align' in node:
self.body.append('<div align="%s" class="img align-%s">' %
(node['align'], node['align']))
self.context.append('</div>\n')
else:
self.context.append('')
atts['class'] = 'align-%s' % node['align']
self.body.append(self.emptytag(node, 'img', '', **atts))
return

Expand All @@ -622,7 +618,7 @@ def visit_image(self, node: Element) -> None:
# overwritten
def depart_image(self, node: Element) -> None:
if node['uri'].lower().endswith(('svg', 'svgz')):
self.body.append(self.context.pop())
pass
else:
super().depart_image(node)

Expand Down

0 comments on commit 60797f8

Please sign in to comment.