mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8649 from sephalon/imgconverter-availability
Skip imgconverter availability check if builder supports the image type
This commit is contained in:
commit
41e6f152eb
@ -197,15 +197,15 @@ class ImageConverter(BaseImageConverter):
|
||||
def match(self, node: nodes.image) -> bool:
|
||||
if not self.app.builder.supported_image_types:
|
||||
return False
|
||||
elif set(node['candidates']) & set(self.app.builder.supported_image_types):
|
||||
# builder supports the image; no need to convert
|
||||
return False
|
||||
elif self.available is None:
|
||||
# store the value to the class variable to share it during the build
|
||||
self.__class__.available = self.is_available()
|
||||
|
||||
if not self.available:
|
||||
return False
|
||||
elif set(node['candidates']) & set(self.app.builder.supported_image_types):
|
||||
# builder supports the image; no need to convert
|
||||
return False
|
||||
else:
|
||||
rule = self.get_conversion_rule(node)
|
||||
if rule:
|
||||
|
Loading…
Reference in New Issue
Block a user