git.iko.soy/typeable/pandoc
on master help sign in
Fixed svg handling in EPUB writer.
adfb217John MacFarlane
src/Text/Pandoc/MIME.hs+3−1
@@ -433,7 +433,9 @@ mimeTypesList = -- List borrowed from happstack-server.
433 ,("sv4cpio","application/x-sv4cpio")
433 ,("sv4cpio","application/x-sv4cpio")
434 ,("sv4crc","application/x-sv4crc")
434 ,("sv4crc","application/x-sv4crc")
435 ,("svg","image/svg+xml")
435 ,("svg","image/svg+xml")
436+ -- removed for now, since it causes problems with
437+ -- extensionFromMimeType: see #2183.
436− ,("svgz","image/svg+xml")
438+ -- ,("svgz","image/svg+xml")
437 ,("sw","chemical/x-swissprot")
439 ,("sw","chemical/x-swissprot")
438 ,("swf","application/x-shockwave-flash")
440 ,("swf","application/x-shockwave-flash")
439 ,("swfl","application/x-shockwave-flash")
441 ,("swfl","application/x-shockwave-flash")
src/Text/Pandoc/Shared.hs+1
@@ -796,6 +796,7 @@ fetchItem sourceURL s =
796 fp = unEscapeString $ dropFragmentAndQuery s
796 fp = unEscapeString $ dropFragmentAndQuery s
797 mime = case takeExtension fp of
797 mime = case takeExtension fp of
798 ".gz" -> getMimeType $ dropExtension fp
798 ".gz" -> getMimeType $ dropExtension fp
799+ ".svgz" -> getMimeType $ dropExtension fp ++ ".svg"
799 x -> getMimeType x
800 x -> getMimeType x
800 ensureEscaped x@(_:':':'\\':_) = x -- likely windows path
801 ensureEscaped x@(_:':':'\\':_) = x -- likely windows path
801 ensureEscaped x = escapeURIString isAllowedInURI x
802 ensureEscaped x = escapeURIString isAllowedInURI x