From da0842b5b5022b31aa22a78bc223e2df86a4f3a5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 21 Jul 2015 13:07:52 -0700 Subject: HTML reader: handle type attribute on ol. E.g. `
    `. Closes #2313. --- src/Text/Pandoc/Readers/HTML.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 361d64361..c43bc5295 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -270,7 +270,14 @@ pOrderedList = try $ do "lower-alpha" -> LowerAlpha "upper-alpha" -> UpperAlpha "decimal" -> Decimal - _ -> DefaultStyle + _ -> + case lookup "type" attribs of + Just "1" -> Decimal + Just "I" -> UpperRoman + Just "i" -> LowerRoman + Just "A" -> UpperAlpha + Just "a" -> LowerAlpha + _ -> DefaultStyle let nonItem = pSatisfy (\t -> not (tagOpen (`elem` ["li","ol","ul","dl"]) (const True) t) && not (t ~== TagClose "ol")) -- cgit v1.2.3