@@ -265,8 +265,20 @@ definitionList :: Parser [Char] ParserState Blocks
265definitionList = try $ B.definitionList <$> many1 definitionListItem
265definitionList = try $ B.definitionList <$> many1 definitionListItem
267-- | List start character.
267-- | List start character.
268−listStart :: Parser [Char] st Char
268+listStart :: Parser [Char] ParserState ()
269−listStart = oneOf "*#-"
269+listStart = genericListStart '*'
270+ <|> () <$ genericListStart '#'
271+ <|> () <$ definitionListStart
273+genericListStart :: Char -> Parser [Char] st ()
274+genericListStart c = () <$ try (many1 (char c) >> whitespace)
276+definitionListStart :: Parser [Char] ParserState Inlines
277+definitionListStart = try $ do
280+ trimInlines . mconcat <$>
281+ many1Till inline (try (string ":=")) <* optional whitespace
271listInline :: Parser [Char] ParserState Inlines
283listInline :: Parser [Char] ParserState Inlines
272listInline = try (notFollowedBy newline >> inline)
284listInline = try (notFollowedBy newline >> inline)
@@ -278,8 +290,7 @@ listInline = try (notFollowedBy newline >> inline)
279definitionListItem :: Parser [Char] ParserState (Inlines, [Blocks])
291definitionListItem :: Parser [Char] ParserState (Inlines, [Blocks])
280definitionListItem = try $ do
292definitionListItem = try $ do
281− string "- "
293+ term <- definitionListStart
282− term <- mconcat <$> many1Till inline (try (whitespace >> string ":="))
283 def' <- multilineDef <|> inlineDef
294 def' <- multilineDef <|> inlineDef
284 return (term, def')
295 return (term, def')
285 where inlineDef :: Parser [Char] ParserState [Blocks]
296 where inlineDef :: Parser [Char] ParserState [Blocks]
@@ -488,7 +499,7 @@ str = do
488 return $ B.str fullStr
499 return $ B.str fullStr
490-- | Some number of space chars
501-- | Some number of space chars
491−whitespace :: Parser [Char] ParserState Inlines
502+whitespace :: Parser [Char] st Inlines
492whitespace = many1 spaceChar >> return B.space <?> "whitespace"
503whitespace = many1 spaceChar >> return B.space <?> "whitespace"
494-- | In Textile, an isolated endline character is a line break
505-- | In Textile, an isolated endline character is a line break