mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #6998 from Modelmat/adobe-illustrator-imgconverter
Adds support for Adobe Illustrator (.ai) to sphinx.ext.imgconverter
This commit is contained in:
commit
1eac74fa35
@ -27,6 +27,7 @@ class ImagemagickConverter(ImageConverter):
|
||||
('image/svg+xml', 'image/png'),
|
||||
('image/gif', 'image/png'),
|
||||
('application/pdf', 'image/png'),
|
||||
('application/illustrator', 'image/png'),
|
||||
]
|
||||
|
||||
def is_available(self) -> bool:
|
||||
|
@ -222,7 +222,6 @@ class ImageConverter(BaseImageConverter):
|
||||
if '?' in node['candidates']:
|
||||
return []
|
||||
elif '*' in node['candidates']:
|
||||
from sphinx.util.images import guess_mimetype
|
||||
return [guess_mimetype(node['uri'])]
|
||||
else:
|
||||
return node['candidates'].keys()
|
||||
|
@ -32,6 +32,7 @@ mime_suffixes = OrderedDict([
|
||||
('.pdf', 'application/pdf'),
|
||||
('.svg', 'image/svg+xml'),
|
||||
('.svgz', 'image/svg+xml'),
|
||||
('.ai', 'application/illustrator'),
|
||||
])
|
||||
|
||||
DataURI = NamedTuple('DataURI', [('mimetype', str),
|
||||
|
Loading…
Reference in New Issue
Block a user