mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
ImageConverter: ignore '?' image URIs
This commit is contained in:
parent
2be0630951
commit
6f221be933
@ -197,12 +197,11 @@ class ImageConverter(BaseImageConverter):
|
|||||||
def match(self, node: nodes.image) -> bool:
|
def match(self, node: nodes.image) -> bool:
|
||||||
if not self.app.builder.supported_image_types:
|
if not self.app.builder.supported_image_types:
|
||||||
return False
|
return False
|
||||||
|
elif '?' in node['candidates']:
|
||||||
|
return False
|
||||||
elif set(self.guess_mimetypes(node)) & set(self.app.builder.supported_image_types):
|
elif set(self.guess_mimetypes(node)) & set(self.app.builder.supported_image_types):
|
||||||
# builder supports the image; no need to convert
|
# builder supports the image; no need to convert
|
||||||
return False
|
return False
|
||||||
elif node['uri'].startswith('data:'):
|
|
||||||
# all data URI MIME types are assumed to be supported
|
|
||||||
return False
|
|
||||||
elif self.available is None:
|
elif self.available is None:
|
||||||
# store the value to the class variable to share it during the build
|
# store the value to the class variable to share it during the build
|
||||||
self.__class__.available = self.is_available()
|
self.__class__.available = self.is_available()
|
||||||
|
Loading…
Reference in New Issue
Block a user