git.iko.soy/typeable/pandoc
on master help sign in
Fixed regression with lists inside defintiion lists.

This fixes a regression (not in any released version) on things like hi : - there Closes #2098.

commitd9d88e58e1d710c86ef4037c352244ea6b439fa3 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 26 Apr 2015, 11:20 (12 years ago) parent2793d98
2 files changed+4−1
src/Text/Pandoc/Readers/Markdown.hs+1−1 tests/Tests/Readers/Markdown.hs+3
src/Text/Pandoc/Readers/Markdown.hs+1−1
@@ -883,7 +883,7 @@ definitionListItem compact = try $ do
883883 rawLine' <- anyLine
884884 raw <- many1 $ defRawBlock compact
885885 term <- parseFromString (trimInlinesF . mconcat <$> many inline) rawLine'
886− contents <- mapM (parseFromString parseBlocks) raw
886+ contents <- mapM (parseFromString parseBlocks . (++"\n")) raw
887887 optional blanklines
888888 return $ liftM2 (,) term (sequence contents)
889889
tests/Tests/Readers/Markdown.hs+3
@@ -276,6 +276,9 @@ tests = [ testGroup "inline code"
276276 , "first line not indented" =:
277277 "foo\n: bar\n" =?>
278278 definitionList [ (text "foo", [plain (text "bar")]) ]
279+ , "list in definition" =:
280+ "foo\n: - bar\n" =?>
281+ definitionList [ (text "foo", [bulletList [plain (text "bar")]]) ]
279282 ]
280283 , testGroup "+compact_definition_lists"
281284 [ test markdownCDL "basic compact list" $