@@ -105,8 +105,8 @@ skipEndline = option Space endline
105105indentSpaces = do
106106 state <- getState
107107 let tabStop = stateTabStop state
108− count tabStop (char ' ') <|>
109− (do{nonindentSpaces; string "\t"}) <?> "indentation"
108+ try (count tabStop (char ' ')) <|>
109+ (do{many (char ' '); string "\t"}) <?> "indentation"
110110
111111nonindentSpaces = do
112112 state <- getState
@@ -349,7 +349,7 @@ blockQuote = do
349349-- list blocks
350350--
351351
352−list = choice [ bulletList, orderedList ] <?> "list"
352+list = choice [ bulletList, orderedList, definitionList ] <?> "list"
353353
354354bulletListStart = try (do
355355 option ' ' newline -- if preceded by a Plain block in a list context
@@ -443,13 +443,18 @@ definitionListItem = try $ do
443443 notFollowedBy blankline
444444 notFollowedBy' indentSpaces
445445 term <- manyTill inline newline
446− raw <- many1 defRawBlock
446+ char ':'
447447 state <- getState
448+ let tabStop = stateTabStop state
449+ try (count (tabStop - 1) (char ' ')) <|> (do{many (char ' '); string "\t"})
450+ firstline <- anyLine
451+ blanksAfterFirst <- option "" blanklines
452+ raw <- many defRawBlock
448453 let oldContext = stateParserContext state
449454 setState $ state {stateParserContext = ListItemState}
450455 -- parse the extracted block, which may contain various block elements:
451456 rest <- getInput
452− setInput (concat raw)
457+ setInput (concat (firstline:"\n":blanksAfterFirst:raw))
453458 contents <- parseBlocks
454459 setInput rest
455460 updateState (\st -> st {stateParserContext = oldContext})
@@ -461,6 +466,7 @@ defRawBlock = try $ do
461466 return $ (unlines rawlines) ++ trailing
462467
463468definitionList = do
469+ failIfStrict
464470 items <- many1 definitionListItem
465471 let (terms, defs) = unzip items
466472 let defs' = compactify defs