From f79a6f11631f9e26b7a4113f846b22b34593f190 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Mon, 15 Jan 2018 14:48:35 -0500 Subject: Powerpoint writer: Import reference-doc images properly. There was a glob error that was leading to images from the reference-doc pptx not being imported. We don't need a glob here -- just replace it with `isPrefixOf`. --- src/Text/Pandoc/Writers/Powerpoint/Output.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index c45479579..540df6afa 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -38,7 +38,7 @@ import Control.Monad.Except (throwError, catchError) import Control.Monad.Reader import Control.Monad.State import Codec.Archive.Zip -import Data.List (intercalate, stripPrefix, nub, union) +import Data.List (intercalate, stripPrefix, nub, union, isPrefixOf) import Data.Default import Data.Time.Clock (UTCTime) import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds, posixSecondsToUTCTime) @@ -68,7 +68,7 @@ import Text.Pandoc.Writers.Powerpoint.Presentation initialGlobalIds :: Archive -> Archive -> M.Map FilePath Int initialGlobalIds refArchive distArchive = let archiveFiles = filesInArchive refArchive `union` filesInArchive distArchive - mediaPaths = filter (match (compile "ppt/media/image")) archiveFiles + mediaPaths = filter (isPrefixOf "ppt/media/image") archiveFiles go :: FilePath -> Maybe (FilePath, Int) go fp = do -- cgit v1.2.3