summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs5
-rw-r--r--test/Tests/Readers/Muse.hs6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 26da57883..d86c46aca 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -153,6 +153,7 @@ htmlElement tag = try $ do
htmlBlock :: PandocMonad m => String -> MuseParser m (Attr, String)
htmlBlock tag = try $ do
+ many spaceChar
res <- htmlElement tag
manyTill spaceChar eol
return res
@@ -166,7 +167,8 @@ htmlAttrToPandoc attrs = (ident, classes, keyvals)
parseHtmlContent :: PandocMonad m
=> String -> MuseParser m (Attr, F Blocks)
-parseHtmlContent tag = do
+parseHtmlContent tag = try $ do
+ many spaceChar
(TagOpen _ attr, _) <- htmlTag (~== TagOpen tag [])
manyTill spaceChar eol
content <- parseBlocksTill (manyTill spaceChar endtag)
@@ -398,7 +400,6 @@ dropSpacePrefix lns =
exampleTag :: PandocMonad m => MuseParser m (F Blocks)
exampleTag = try $ do
- many spaceChar
(attr, contents) <- htmlBlock "example"
return $ return $ B.codeBlockWith attr $ rchop $ intercalate "\n" $ dropSpacePrefix $ splitOn "\n" $ lchop contents
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index d951fca49..3537ab040 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -328,6 +328,12 @@ tests =
, "</quote>"
] =?>
blockQuote (para "foo" <> blockQuote (para "bar") <> para "baz")
+ , "Indented quote inside list" =:
+ T.unlines [ " - <quote>"
+ , " foo"
+ , " </quote>"
+ ] =?>
+ bulletList [ blockQuote (para "foo") ]
, "Verse tag" =:
T.unlines [ "<verse>"
, ""