mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Edit Book: Enable editing of page map XML files
This commit is contained in:
parent
21971d0e25
commit
77edd3a7a9
@ -102,6 +102,8 @@ def check_mimetypes(container):
|
||||
for name, mt in container.mime_map.iteritems():
|
||||
gt = container.guess_type(name)
|
||||
if mt != gt:
|
||||
if mt == 'application/oebps-page-map+xml' and name.lower().endswith('.xml'):
|
||||
continue
|
||||
a(MimetypeMismatch(container, name, mt, gt))
|
||||
return errors
|
||||
|
||||
|
@ -16,7 +16,7 @@ def syntax_from_mime(name, mime):
|
||||
return 'html'
|
||||
if mime in OEB_STYLES:
|
||||
return 'css'
|
||||
if mime in {guess_type('a.opf'), guess_type('a.ncx'), guess_type('a.xml')}:
|
||||
if mime in {guess_type('a.opf'), guess_type('a.ncx'), guess_type('a.xml'), 'application/oebps-page-map+xml'}:
|
||||
return 'xml'
|
||||
if mime.startswith('text/'):
|
||||
return 'text'
|
||||
|
Loading…
x
Reference in New Issue
Block a user