diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-07-21 13:07:52 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-07-21 13:07:52 -0700 |
commit | da0842b5b5022b31aa22a78bc223e2df86a4f3a5 (patch) | |
tree | 19c6641cf66052672e1a765ea2da365e2c92c797 /src/Text/Pandoc | |
parent | f6ad9e263faac85fd132610ad2c7d9cf4f517091 (diff) | |
download | pandoc-da0842b5b5022b31aa22a78bc223e2df86a4f3a5.tar.gz |
HTML reader: handle type attribute on ol.
E.g. `<ol type="i">`.
Closes #2313.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 9 |
1 files changed, 8 insertions, 1 deletions
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")) |