@@ -407,12 +407,14 @@ parseBlockQuote = blockQuote <$> continuation
407407
408408data ListType = Ordered ListAttributes
409409 | Bullet
410+ | Definition T.Text
410411
411412listTypeMatches :: Maybe ListType -> ListType -> Bool
412413listTypeMatches Nothing _ = True
413414listTypeMatches (Just Bullet) Bullet = True
414415listTypeMatches (Just (Ordered (_,x,y))) (Ordered (_,x',y'))
415416 = x == x' && y == y'
417+listTypeMatches (Just (Definition _)) (Definition _) = True
416418listTypeMatches (Just _) _ = False
417419
418420listItem :: PandocMonad m => Maybe ListType -> ManParser m (ListType, Blocks)
@@ -427,20 +429,28 @@ listItem mbListType = try $ do
427429 Right (start, listtype, listdelim)
428430 | cs == cs' -> Ordered (start, listtype, listdelim)
429431 | otherwise -> Ordered (start, listtype, DefaultDelim)
430− Left _ -> Bullet
432+ Left _
433+ | cs == "\183" || cs == "-" || cs == "*" || cs == "+"
434+ -> Bullet
435+ | otherwise -> Definition cs
431436 guard $ listTypeMatches mbListType lt
437+ skipMany memptyLine
432438 inls <- option mempty parseInlines
439+ skipMany memptyLine
433440 continuations <- mconcat <$> many continuation
434441 return (lt, para inls <> continuations)
435442 [] -> mzero
436443
437444parseList :: PandocMonad m => ManParser m Blocks
438445parseList = try $ do
439− (lt, x) <- listItem Nothing
440− xs <- map snd <$> many (listItem (Just lt))
446+ x@(lt, _) <- listItem Nothing
447+ xs <- many (listItem (Just lt))
448+ let toDefItem (Definition t, bs) = (B.text t, [bs])
449+ toDefItem _ = mempty
441450 return $ case lt of
442− Bullet -> bulletList (x:xs)
443− Ordered lattr -> orderedListWith lattr (x:xs)
451+ Bullet -> bulletList $ map snd (x:xs)
452+ Ordered lattr -> orderedListWith lattr $ map snd (x:xs)
453+ Definition _ -> definitionList $ map toDefItem (x:xs)
444454
445455continuation :: PandocMonad m => ManParser m Blocks
446456continuation =
@@ -453,11 +463,15 @@ definitionListItem :: PandocMonad m
453463 => ManParser m (Inlines, [Blocks])
454464definitionListItem = try $ do
455465 mmacro "TP" -- args specify indent level, can ignore
466+ skipMany memptyLine
456467 term <- parseInline
468+ skipMany memptyLine
457469 moreterms <- many $ try $ do
458470 mmacro "TQ"
459471 parseInline
472+ skipMany memptyLine
460473 inls <- option mempty parseInlines
474+ skipMany memptyLine
461475 continuations <- mconcat <$> many continuation
462476 return ( mconcat (intersperse B.linebreak (term:moreterms))
463477 , [para inls <> continuations])