aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Docx/Fields.hs2
-rw-r--r--test/Tests/Readers/Docx.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Fields.hs b/src/Text/Pandoc/Readers/Docx/Fields.hs
index ececf94c7..fe15c59e9 100644
--- a/src/Text/Pandoc/Readers/Docx/Fields.hs
+++ b/src/Text/Pandoc/Readers/Docx/Fields.hs
@@ -42,7 +42,7 @@ escapedQuote = string "\\\"" $> "\\\""
inQuotes :: Parser T.Text
inQuotes =
- try escapedQuote <|> (anyChar >>= (\c -> return $ T.singleton c))
+ try escapedQuote <|> (T.singleton <$> anyChar)
quotedString :: Parser T.Text
quotedString = do
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 4d2e0d276..840a033f5 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -92,7 +92,7 @@ testForWarningsWithOpts opts name docxFile expected =
getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString)
getMedia archivePath mediaPath = do
zf <- toArchive <$> B.readFile archivePath
- return $ findEntryByPath ("word/" ++ mediaPath) zf >>= (Just . fromEntry)
+ return $ fromEntry <$> findEntryByPath ("word/" ++ mediaPath) zf
compareMediaPathIO :: FilePath -> MediaBag -> FilePath -> IO Bool
compareMediaPathIO mediaPath mediaBag docxPath = do