aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs3
-rw-r--r--test/Tests/Readers/Muse.hs11
2 files changed, 13 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index e89a89b8f..1fb37aa16 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -521,7 +521,8 @@ blanklineVerseLine = try $ do
lineBlock :: PandocMonad m => MuseParser m (F Blocks)
lineBlock = try $ do
- lns <- many1 (blanklineVerseLine <|> lineVerseLine)
+ col <- sourceColumn <$> getPosition
+ lns <- (blanklineVerseLine <|> lineVerseLine) `sepBy1'` try (indentWith (col - 1))
return $ B.lineBlock <$> sequence lns
--
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 2a350d252..c0ebf33cc 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -296,6 +296,17 @@ tests =
, "\160\160\160is here"
]
]
+ , "Verse in list" =: " - > foo" =?> bulletList [ lineBlock [ "foo" ] ]
+ , "Multiline verse in list" =:
+ T.unlines [ " - > foo"
+ , " > bar"
+ ] =?>
+ bulletList [ lineBlock [ "foo", "bar" ] ]
+ , "Paragraph after verse in list" =:
+ T.unlines [ " - > foo"
+ , " bar"
+ ] =?>
+ bulletList [ lineBlock [ "foo" ] <> para "bar" ]
, "Empty quote tag" =:
T.unlines [ "<quote>"
, "</quote>"