@@ -178,7 +178,6 @@ codeBlockPre :: PandocMonad m => ParserT [Char] ParserState m Blocks
178178codeBlockPre = try $ do
179179 (t@(TagOpen _ attrs),_) <- htmlTag (tagOpen (=="pre") (const True))
180180 result' <- manyTill anyChar (htmlTag (tagClose (=="pre")))
181− optional blanklines
182181 -- drop leading newline if any
183182 let result'' = case result' of
184183 '\n':xs -> xs
@@ -262,10 +261,11 @@ orderedListItemAtDepth = genericListItemAtDepth '#'
262261genericListItemAtDepth :: PandocMonad m => Char -> Int -> ParserT [Char] ParserState m Blocks
263262genericListItemAtDepth c depth = try $ do
264263 count depth (char c) >> attributes >> whitespace
265− p <- mconcat <$> many listInline
264+ contents <- mconcat <$> many ((B.plain . mconcat <$> many1 inline) <|>
265+ try (newline >> codeBlockPre))
266266 newline
267267 sublist <- option mempty (anyListAtDepth (depth + 1))
268− return $ (B.plain p) <> sublist
268+ return $ contents <> sublist
269269
270270-- | A definition list is a set of consecutive definition items
271271definitionList :: PandocMonad m => ParserT [Char] ParserState m Blocks
@@ -295,10 +295,6 @@ definitionListStart = try $ do
295295 <|> try (lookAhead (() <$ string ":="))
296296 )
297297
298−listInline :: PandocMonad m => ParserT [Char] ParserState m Inlines
299−listInline = try (notFollowedBy newline >> inline)
300− <|> try (endline <* notFollowedBy listStart)
301−
302298-- | A definition list item in textile begins with '- ', followed by
303299-- the term defined, then spaces and ":=". The definition follows, on
304300-- the same single line, or spaned on multiple line, after a line
@@ -310,7 +306,7 @@ definitionListItem = try $ do
310306 return (term, def')
311307 where inlineDef :: PandocMonad m => ParserT [Char] ParserState m [Blocks]
312308 inlineDef = liftM (\d -> [B.plain d])
313− $ optional whitespace >> (trimInlines . mconcat <$> many listInline) <* newline
309+ $ optional whitespace >> (trimInlines . mconcat <$> many inline) <* newline
314310 multilineDef :: PandocMonad m => ParserT [Char] ParserState m [Blocks]
315311 multilineDef = try $ do
316312 optional whitespace >> newline