Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-03-23 20:21:19 +0300
committerGitHub <noreply@github.com>2022-03-23 20:21:19 +0300
commit138d71fa639ba53ccc8d833aac69b24032461840 (patch)
tree9e1e7dda46dda8a98fe8ac72d46919231324da79
parent1e1f8e218046cbcda69be1f58234324fc48c7db4 (diff)
parent6f221be93398cb5669e44c0fa246d0baa219412e (diff)
Merge pull request #10118 from mgeier/image-converter-ignore-questionmark
ImageConverter: ignore '?' image URIs
-rw-r--r--sphinx/transforms/post_transforms/images.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py
index ac9c4225e..1b9e901ff 100644
--- a/sphinx/transforms/post_transforms/images.py
+++ b/sphinx/transforms/post_transforms/images.py
@@ -189,12 +189,11 @@ class ImageConverter(BaseImageConverter):
def match(self, node: nodes.image) -> bool:
if not self.app.builder.supported_image_types:
return False
+ elif '?' in node['candidates']:
+ return False
elif set(self.guess_mimetypes(node)) & set(self.app.builder.supported_image_types):
# builder supports the image; no need to convert
return False
- elif node['uri'].startswith('data:'):
- # all data URI MIME types are assumed to be supported
- 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()