git.iko.soy/typeable/pandoc
on master help sign in
Fixed regression with lists inside defintiion lists.
d9d88e5John MacFarlane
src/Text/Pandoc/Readers/Markdown.hs+1−1
@@ -883,7 +883,7 @@ definitionListItem compact = try $ do
883 rawLine' <- anyLine
883 rawLine' <- anyLine
884 raw <- many1 $ defRawBlock compact
884 raw <- many1 $ defRawBlock compact
885 term <- parseFromString (trimInlinesF . mconcat <$> many inline) rawLine'
885 term <- parseFromString (trimInlinesF . mconcat <$> many inline) rawLine'
886− contents <- mapM (parseFromString parseBlocks) raw
886+ contents <- mapM (parseFromString parseBlocks . (++"\n")) raw
887 optional blanklines
887 optional blanklines
888 return $ liftM2 (,) term (sequence contents)
888 return $ liftM2 (,) term (sequence contents)
889
889
tests/Tests/Readers/Markdown.hs+3
@@ -276,6 +276,9 @@ tests = [ testGroup "inline code"
276 , "first line not indented" =:
276 , "first line not indented" =:
277 "foo\n: bar\n" =?>
277 "foo\n: bar\n" =?>
278 definitionList [ (text "foo", [plain (text "bar")]) ]
278 definitionList [ (text "foo", [plain (text "bar")]) ]
279+ , "list in definition" =:
280+ "foo\n: - bar\n" =?>
281+ definitionList [ (text "foo", [bulletList [plain (text "bar")]]) ]
279 ]
282 ]
280 , testGroup "+compact_definition_lists"
283 , testGroup "+compact_definition_lists"
281 [ test markdownCDL "basic compact list" $
284 [ test markdownCDL "basic compact list" $