Merge pull request #7643 from tk0miya/7628_imgconverter_unnecessary

Fix #7628: imgconverter: runs imagemagick unnecessary
This commit is contained in:
Takeshi KOMIYA
2020-05-10 23:12:37 +09:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -93,6 +93,8 @@ Bugs fixed
* #7536: sphinx-autogen: crashes when template uses i18n feature
* #2785: html: Bad alignment of equation links
* #7581: napoleon: bad parsing of inline code in attribute docstrings
* #7628: imgconverter: runs imagemagick once unnecessary for builders not
supporting images
* #7610: incorrectly renders consecutive backslashes for docutils-0.16
Testing

View File

@@ -193,7 +193,9 @@ class ImageConverter(BaseImageConverter):
super().__init__(*args, **kwargs)
def match(self, node: nodes.image) -> bool:
if self.available is None:
if not self.app.builder.supported_image_types:
return False
elif self.available is None:
self.available = self.is_available()
if not self.available: