git.iko.soy/typeable/pandoc
on master help sign in
Changed syntax of definition lists in Markdown parser:

+ definition blocks must be indented throughout (not just in first line) + compact lists can be formed by leaving no blank line between a definition and the next term git-svn-id: https://pandoc.googlecode.com/svn/trunk@568 788f1e2b-df1e-0410-8736-df70ead52e1b

commit115cad888245179e4a455a74dd4d8139a760f776 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 10 Mar 2007, 20:45 (20 years ago) parentd277bae
1 file changed+7−6
src/Text/Pandoc/Readers/Markdown.hs+7−6
src/Text/Pandoc/Readers/Markdown.hs+7−6
@@ -456,15 +456,16 @@ definitionListItem = try $ do
456456 return ((normalizeSpaces term), contents)
457457
458458defRawBlock = try $ do
459− indentSpaces
460− first <- anyLine
461− rest <- manyTill (do {option "" (try indentSpaces);
462− anyLine}) blanklines
463− return $ (unlines (first:rest)) ++ "\n"
459+ rawlines <- many1 (do {notFollowedBy' blankline; indentSpaces; anyLine})
460+ trailing <- option "" blanklines
461+ return $ (unlines rawlines) ++ trailing
464462
465463definitionList = do
466464 items <- many1 definitionListItem
467− return $ DefinitionList items
465+ let (terms, defs) = unzip items
466+ let defs' = compactify defs
467+ let items' = zip terms defs'
468+ return $ DefinitionList items'
468469
469470--
470471-- paragraph block