git.iko.soy/typeable/pandoc
on master help sign in
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`.

commitf79a6f11631f9e26b7a4113f846b22b34593f190 authorJesse Rosenthal <jrosenthal@jhu.edu> dateMon 15 Jan 2018, 14:48 (9 years ago) parent4b7bc40
1 file changed+2−2
src/Text/Pandoc/Writers/Powerpoint/Output.hs+2−2
src/Text/Pandoc/Writers/Powerpoint/Output.hs+2−2
@@ -38,7 +38,7 @@ import Control.Monad.Except (throwError, catchError)
3838import Control.Monad.Reader
3939import Control.Monad.State
4040import Codec.Archive.Zip
41−import Data.List (intercalate, stripPrefix, nub, union)
41+import Data.List (intercalate, stripPrefix, nub, union, isPrefixOf)
4242import Data.Default
4343import Data.Time.Clock (UTCTime)
4444import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds, posixSecondsToUTCTime)
@@ -68,7 +68,7 @@ import Text.Pandoc.Writers.Powerpoint.Presentation
6868initialGlobalIds :: Archive -> Archive -> M.Map FilePath Int
6969initialGlobalIds refArchive distArchive =
7070 let archiveFiles = filesInArchive refArchive `union` filesInArchive distArchive
71− mediaPaths = filter (match (compile "ppt/media/image")) archiveFiles
71+ mediaPaths = filter (isPrefixOf "ppt/media/image") archiveFiles
7272
7373 go :: FilePath -> Maybe (FilePath, Int)
7474 go fp = do