aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-03-07 14:21:31 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-03-07 14:24:16 +0300
commit4d2bf177fc8e41d385631c1d1abfe7943680982e (patch)
treeffd42f6f8154e5af461f91e725f3012791ed4e34 /src
parent54a6b75510d3f8bd872b97189ec7fa94bdc6fb30 (diff)
downloadpandoc-4d2bf177fc8e41d385631c1d1abfe7943680982e.tar.gz
Muse reader: do not produce empty Str element for unindented verse lines
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs5
1 files changed, 3 insertions, 2 deletions
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