Skip to content

Commit

Permalink
HTML: remove unnecessary SVG processing
Browse files Browse the repository at this point in the history
  • Loading branch information
tuncbkose committed Jul 3, 2024
1 parent 086a791 commit f585a12
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions sphinx/writers/html5.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,24 +694,6 @@ def visit_image(self, node: Element) -> None:
if 'height' not in node:
node['height'] = str(size[1])

uri = node['uri']
if uri.lower().endswith(('svg', 'svgz')):
atts = {'src': uri}
if 'width' in node:
atts['width'] = node['width']
if 'height' in node:
atts['height'] = node['height']
if 'scale' in node:
if 'width' in atts:
atts['width'] = multiply_length(atts['width'], node['scale'])
if 'height' in atts:
atts['height'] = multiply_length(atts['height'], node['scale'])
atts['alt'] = node.get('alt', uri)
if 'align' in node:
atts['class'] = 'align-%s' % node['align']
self.body.append(self.emptytag(node, 'img', '', **atts))
return

super().visit_image(node)

# overwritten
Expand Down

0 comments on commit f585a12

Please sign in to comment.