aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/Docx.hs
diff options
context:
space:
mode:
authorJoseph C. Sible <josephcsible@users.noreply.github.com>2020-03-29 01:48:47 -0400
committerGitHub <noreply@github.com>2020-03-28 22:48:47 -0700
commit7233a7a9329c6c4e75f84b9dca01cb05bf2a55b7 (patch)
tree0731f09d09185fe263570019b9694f952342446e /test/Tests/Readers/Docx.hs
parentc812ff7e897fcc43448b26e5ce53480eeb5a81f9 (diff)
downloadpandoc-7233a7a9329c6c4e75f84b9dca01cb05bf2a55b7.tar.gz
More cleanup (#6209)
* Simplify by collapsing a do block into a single <$> * Remove an unnecessary variable: `all` takes any Foldable, so only blocksToInlines needs toList.
Diffstat (limited to 'test/Tests/Readers/Docx.hs')
-rw-r--r--test/Tests/Readers/Docx.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 3caaa1316..456e0affe 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -90,9 +90,8 @@ testForWarningsWithOpts opts name docxFile expected =
-- testForWarnings = testForWarningsWithOpts defopts
getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString)
-getMedia archivePath mediaPath = do
- zf <- toArchive <$> B.readFile archivePath
- return $ fromEntry <$> findEntryByPath ("word/" ++ mediaPath) zf
+getMedia archivePath mediaPath = fmap fromEntry . findEntryByPath
+ ("word/" ++ mediaPath) . toArchive <$> B.readFile archivePath
compareMediaPathIO :: FilePath -> MediaBag -> FilePath -> IO Bool
compareMediaPathIO mediaPath mediaBag docxPath = do