From 1c8683f205c6e0b028dd62a13936d9a9f6124270 Mon Sep 17 00:00:00 2001 From: schrieveslaach Date: Sun, 16 Apr 2017 19:39:24 +0200 Subject: Read image size of Inkscape SVGs (#3580) --- src/Text/Pandoc/ImageSize.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/ImageSize.hs b/src/Text/Pandoc/ImageSize.hs index 5cede7083..8b2d577a9 100644 --- a/src/Text/Pandoc/ImageSize.hs +++ b/src/Text/Pandoc/ImageSize.hs @@ -108,15 +108,15 @@ imageType img = case B.take 4 img of "%PDF" -> return Pdf " return Svg " return Svg "%!PS" | (B.take 4 $ B.drop 1 $ B.dropWhile (/=' ') img) == "EPSF" -> return Eps _ -> mzero - where - -- B.groupBy openingTag matches first " Bool +findSvgTag img = B.null $ snd (B.breakSubstring img " ByteString -> Either String ImageSize imageSize opts img = -- cgit v1.2.3