diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-07 19:23:17 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-07 19:23:17 +0300 |
commit | 5460ea103bd91ce910e50e11e05c1e5340c2a9e0 (patch) | |
tree | 2009eec87f4ef7442cd29158c000bd12be17b999 /sphinx/transforms | |
parent | 5ba5602d7173d0da7adfb4f1e6279ff40c56ef47 (diff) | |
parent | d9569a84a28b4720f9adf69ef9778961585ea19a (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/transforms')
-rw-r--r-- | sphinx/transforms/post_transforms/images.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py index fb4c3ca20..2603e0458 100644 --- a/sphinx/transforms/post_transforms/images.py +++ b/sphinx/transforms/post_transforms/images.py @@ -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: |