@@ -548,8 +548,7 @@ listItem :: PandocMonad m
548548listItem start = try $ do
549549 (markerLength, first) <- rawListItem start
550550 rest <- many (listContinuation markerLength)
551− blanks <- choice [ try (many blankline <* lookAhead start),
552− many1 blankline ] -- whole list must end with blank.
551+ skipMany1 blankline <|> () <$ lookAhead start
553552 -- parsing with ListItemState forces markers at beginning of lines to
554553 -- count as list item markers, even if not separated by blank space.
555554 -- see definition of "endline"
@@ -557,7 +556,7 @@ listItem start = try $ do
557556 let oldContext = stateParserContext state
558557 setState $ state {stateParserContext = ListItemState}
559558 -- parse the extracted block, which may itself contain block elements
560− parsed <- parseFromString parseBlocks $ concat (first:rest) ++ blanks
559+ parsed <- parseFromString parseBlocks $ concat (first:rest) ++ "\n"
561560 updateState (\st -> st {stateParserContext = oldContext})
562561 return $ case B.toList parsed of
563562 [Para xs] -> B.singleton $ Plain xs