mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
1f49df62fa
commit
aa2728e71d
@ -23,6 +23,8 @@ def syntax_from_mime(name, mime):
|
|||||||
if mime.startswith('image/') and mime.partition('/')[-1].lower() in {
|
if mime.startswith('image/') and mime.partition('/')[-1].lower() in {
|
||||||
'jpeg', 'jpg', 'gif', 'png'}:
|
'jpeg', 'jpg', 'gif', 'png'}:
|
||||||
return 'raster_image'
|
return 'raster_image'
|
||||||
|
if mime.endswith('+xml'):
|
||||||
|
return 'xml'
|
||||||
|
|
||||||
def editor_from_syntax(syntax, parent=None):
|
def editor_from_syntax(syntax, parent=None):
|
||||||
if syntax in {'text', 'html', 'css', 'xml'}:
|
if syntax in {'text', 'html', 'css', 'xml'}:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user