diff --git a/src/calibre/gui2/tweak_book/editor/__init__.py b/src/calibre/gui2/tweak_book/editor/__init__.py index 9fae86003c..2ce54e4945 100644 --- a/src/calibre/gui2/tweak_book/editor/__init__.py +++ b/src/calibre/gui2/tweak_book/editor/__init__.py @@ -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'}: