From 4d2bf177fc8e41d385631c1d1abfe7943680982e Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 7 Mar 2018 14:21:31 +0300 Subject: Muse reader: do not produce empty Str element for unindented verse lines --- src/Text/Pandoc/Readers/Muse.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 4a9523e84..4c398080c 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -506,9 +506,10 @@ emacsNoteBlock = try $ do lineVerseLine :: PandocMonad m => MuseParser m (F Inlines) lineVerseLine = try $ do string "> " - indent <- B.str <$> many (char ' ' >> pure '\160') + indent <- many (char ' ' >> pure '\160') + let indentEl = if null indent then mempty else B.str indent rest <- manyTill (choice inlineList) eol - return $ trimInlinesF $ mconcat (pure indent : rest) + return $ trimInlinesF $ mconcat (pure indentEl : rest) blanklineVerseLine :: PandocMonad m => MuseParser m (F Inlines) blanklineVerseLine = try $ do -- cgit v1.2.3