diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 61c30f6f2..a7e6b3c29 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -415,10 +415,14 @@ pOrderedList = try $ do let start = fromMaybe 1 $ lookup "start" attribs >>= safeRead let style = fromMaybe DefaultStyle $ (parseTypeAttr <$> lookup "type" attribs) - <|> (parseListStyleType <$> lookup "class" attribs) + <|> (lookup "class" attribs >>= pickClassStyle) <|> (parseListStyleType <$> (lookup "style" attribs >>= pickListStyle)) where pickListStyle = pickStyleAttrProps ["list-style-type", "list-style"] + -- the list style may be one of several words in the class + -- attribute: + pickClassStyle = L.find (/= DefaultStyle) + . map parseListStyleType . T.words -- note: if they have an
    or