mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-21 00:56:08 +01:00
...
This commit is contained in:
parent
1f49df62fa
commit
aa2728e71d
1 changed files with 2 additions and 0 deletions
|
|
@ -23,6 +23,8 @@ def syntax_from_mime(name, mime):
|
|||
if mime.startswith('image/') and mime.partition('/')[-1].lower() in {
|
||||
'jpeg', 'jpg', 'gif', 'png'}:
|
||||
return 'raster_image'
|
||||
if mime.endswith('+xml'):
|
||||
return 'xml'
|
||||
|
||||
def editor_from_syntax(syntax, parent=None):
|
||||
if syntax in {'text', 'html', 'css', 'xml'}:
|
||||
|
|
|
|||
Loading…
Reference in a new issue