mirror of
https://github.com/jgm/pandoc.git
synced 2026-10-29 17:52:33 +08:00
Use <$> instead of >>= and return (#6128)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user