diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 2 | ||||
-rw-r--r-- | tests/Tests/Readers/Markdown.hs | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 8f63663bc..3722fc0c8 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -883,7 +883,7 @@ definitionListItem compact = try $ do rawLine' <- anyLine raw <- many1 $ defRawBlock compact term <- parseFromString (trimInlinesF . mconcat <$> many inline) rawLine' - contents <- mapM (parseFromString parseBlocks) raw + contents <- mapM (parseFromString parseBlocks . (++"\n")) raw optional blanklines return $ liftM2 (,) term (sequence contents) diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index 02d49a70e..9904cb9f1 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -276,6 +276,9 @@ tests = [ testGroup "inline code" , "first line not indented" =: "foo\n: bar\n" =?> definitionList [ (text "foo", [plain (text "bar")]) ] + , "list in definition" =: + "foo\n: - bar\n" =?> + definitionList [ (text "foo", [bulletList [plain (text "bar")]]) ] ] , testGroup "+compact_definition_lists" [ test markdownCDL "basic compact list" $ |