@@ -260,8 +260,12 @@ pBulletList = try $ do
260260pListItem :: PandocMonad m => TagParser m a -> TagParser m Blocks
261261pListItem nonItem = do
262262 TagOpen _ attr <- lookAhead $ pSatisfy (~== TagOpen "li" [])
263− let liDiv = maybe mempty (\x -> B.divWith (x, [], []) mempty) (lookup "id" attr)
264− (liDiv <>) <$> pInTags "li" block <* skipMany nonItem
263+ let addId ident bs = case B.toList bs of
264+ (Plain ils:xs) -> B.fromList (Plain
265+ [Span (ident, [], []) ils] : xs)
266+ _ -> B.divWith (ident, [], []) bs
267+ (maybe id addId (lookup "id" attr)) <$>
268+ pInTags "li" block <* skipMany nonItem
265269
266270parseListStyleType :: String -> ListNumberStyle
267271parseListStyleType "lower-roman" = LowerRoman