@@ -605,9 +605,10 @@ definitionListItem parseMarkerGetLength = try $ do
605605 markerLength <- parseMarkerGetLength
606606 term <- manyTill (noneOf "\n\r") (try $ string "::")
607607 first <- anyLineNewline
608+ blank <- option "" ("\n" <$ blankline)
608609 cont <- concat <$> many (listContinuation markerLength)
609610 term' <- parseFromString inline term
610− contents' <- parseFromString parseBlocks $ first ++ cont
611+ contents' <- parseFromString parseBlocks $ first ++ blank ++ cont
611612 return $ (,) <$> term' <*> fmap (:[]) contents'
612613
613614
@@ -617,16 +618,18 @@ listItem :: OrgParser Int
617618listItem start = try $ do
618619 markerLength <- try start
619620 firstLine <- anyLineNewline
621+ blank <- option "" ("\n" <$ blankline)
620622 rest <- concat <$> many (listContinuation markerLength)
621− parseFromString parseBlocks $ firstLine ++ rest
623+ parseFromString parseBlocks $ firstLine ++ blank ++ rest
622624
623625-- continuation of a list item - indented and separated by blankline or endline.
624626-- Note: nested lists are parsed as continuations.
625627listContinuation :: Int
626628 -> OrgParser String
627629listContinuation markerLength = try $
628− mappend <$> many blankline
629− <*> (concat <$> many1 listLine)
630+ notFollowedBy' blankline
631+ *> (mappend <$> (concat <$> many1 listLine)
632+ <*> many blankline)
630633 where listLine = try $ indentWith markerLength *> anyLineNewline
631634
632635anyLineNewline :: OrgParser String