diff options
Diffstat (limited to 'sphinx/builders/html.py')
| -rw-r--r-- | sphinx/builders/html.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index 81840374..f5218673 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -610,7 +610,8 @@ class StandaloneHTMLBuilder(Builder): """ Builder.post_process_images(self, doctree) for node in doctree.traverse(nodes.image): - if not node.has_key('scale') or \ + scale_keys = ('scale', 'width', 'height') + if not any((key in node) for key in scale_keys) or \ isinstance(node.parent, nodes.reference): # docutils does unfortunately not preserve the # ``target`` attribute on images, so we need to check |
