diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-15 14:48:35 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-15 14:48:35 -0500 |
commit | f79a6f11631f9e26b7a4113f846b22b34593f190 (patch) | |
tree | 0ecde4f879f997ab561c608d20d10bef688ac825 /src/Text/Pandoc | |
parent | 4b7bc40e8ba5a0981bd6429f48fa6acdb21d5d69 (diff) | |
download | pandoc-f79a6f11631f9e26b7a4113f846b22b34593f190.tar.gz |
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`.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint/Output.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 |