From 05275be2cb576561b36a111d04fb42a197ddbab6 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 28 Jan 2018 08:35:00 +0300 Subject: Muse reader: make verseLine return Inlines, not String --- src/Text/Pandoc/Readers/Muse.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Text/Pandoc/Readers/Muse.hs') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 995a3ae9e..27d5922a0 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -302,17 +302,17 @@ divTag = do (attrs, content) <- parseHtmlContentWithAttrs "div" parseBlock return $ B.divWith attrs <$> mconcat content -verseLine :: PandocMonad m => MuseParser m String +verseLine :: PandocMonad m => MuseParser m (F Inlines) verseLine = do line <- anyLine <|> many1Till anyChar eof let (white, rest) = span (== ' ') line - return $ replicate (length white) '\160' ++ rest + let s = replicate (length white) '\160' ++ rest + parseFromString' (trimInlinesF . mconcat <$> many inline) s verseLines :: PandocMonad m => MuseParser m (F Blocks) verseLines = do lns <- many verseLine - lns' <- mapM (parseFromString' (trimInlinesF . mconcat <$> many inline)) lns - return $ B.lineBlock <$> sequence lns' + return $ B.lineBlock <$> sequence lns verseTag :: PandocMonad m => MuseParser m (F Blocks) verseTag = do -- cgit v1.2.3