Skip to content

Commit 138d71f

Browse files
authored
Merge pull request #10118 from mgeier/image-converter-ignore-questionmark
ImageConverter: ignore '?' image URIs
2 parents 1e1f8e2 + 6f221be commit 138d71f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sphinx/transforms/post_transforms/images.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
189189
def match(self, node: nodes.image) -> bool:
190190
if not self.app.builder.supported_image_types:
191191
return False
192+
elif '?' in node['candidates']:
193+
return False
192194
elif set(self.guess_mimetypes(node)) & set(self.app.builder.supported_image_types):
193195
# builder supports the image; no need to convert
194196
return False
195-
elif node['uri'].startswith('data:'):
196-
# all data URI MIME types are assumed to be supported
197-
return False
198197
elif self.available is None:
199198
# store the value to the class variable to share it during the build
200199
self.__class__.available = self.is_available()

0 commit comments

Comments
 (0)