From fc4805f699510d98705225187d91fc0dc83d4637 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 2 Apr 2014 09:39:57 +0530 Subject: [PATCH] Edit book: Allow editing SVG files as raw XML --- src/calibre/gui2/tweak_book/editor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/editor/__init__.py b/src/calibre/gui2/tweak_book/editor/__init__.py index 94215621d4..270f45f2dc 100644 --- a/src/calibre/gui2/tweak_book/editor/__init__.py +++ b/src/calibre/gui2/tweak_book/editor/__init__.py @@ -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'), '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'}: return 'xml' if mime.startswith('text/'): return 'text'