Edit Book: Allow editing xpgt (Adobe Page Template) files as XML.

Fixes #1346543 [Edit Book: Allow editing xpgt files](https://bugs.launchpad.net/calibre/+bug/1346543)
This commit is contained in:
Eli Schwartz 2014-07-21 15:53:58 -04:00 committed by Kovid Goyal
parent e6964c4eee
commit fa47a695ea

View File

@ -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.svg'), guess_type('a.opf'), guess_type('a.ncx'), guess_type('a.xml'), 'application/oebps-page-map+xml'}:
if mime in {guess_type('a.svg'), guess_type('a.opf'), guess_type('a.ncx'), guess_type('a.xml'), 'application/oebps-page-map+xml', 'application/vnd.adobe-page-template+xml'}:
return 'xml'
if mime.startswith('text/'):
return 'text'