diff options
| author | John MacFarlane <fiddlosopher@gmail.com> | 2011-11-18 21:26:25 -0800 |
|---|---|---|
| committer | John MacFarlane <fiddlosopher@gmail.com> | 2011-11-18 21:26:25 -0800 |
| commit | bea0fdf6e6d3f6dab000a6a4b6a0f74776348b98 (patch) | |
| tree | dac6fbe7a3e5b604c92a01e70c2e6d73ad00f48d | |
| parent | 1561d51cc58ee6b915a35bd057830d4b27379b5b (diff) | |
| download | pandoc-bea0fdf6e6d3f6dab000a6a4b6a0f74776348b98.tar.gz | |
AsciiDoc: Don't use Roman numerals in ordered lists.
AsiiDoc doesn't support them.
| -rw-r--r-- | src/Text/Pandoc/Writers/AsciiDoc.hs | 8 | ||||
| -rw-r--r-- | tests/writer.asciidoc | 14 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs index f2436e3ff..ab2b01656 100644 --- a/src/Text/Pandoc/Writers/AsciiDoc.hs +++ b/src/Text/Pandoc/Writers/AsciiDoc.hs @@ -213,8 +213,12 @@ blockToAsciiDoc opts (Table caption aligns widths headers rows) = do blockToAsciiDoc opts (BulletList items) = do contents <- mapM (bulletListItemToAsciiDoc opts) items return $ cat contents <> blankline -blockToAsciiDoc opts (OrderedList (start, sty, _delim) items) = do - let markers = orderedListMarkers (start, sty, Period) +blockToAsciiDoc opts (OrderedList (_start, sty, _delim) items) = do + let sty' = case sty of + UpperRoman -> UpperAlpha + LowerRoman -> LowerAlpha + x -> x + let markers = orderedListMarkers (1, sty', Period) -- start num not used let markers' = map (\m -> if length m < 3 then m ++ replicate (3 - length m) ' ' else m) markers diff --git a/tests/writer.asciidoc b/tests/writer.asciidoc index 8256b1f34..440127379 100644 --- a/tests/writer.asciidoc +++ b/tests/writer.asciidoc @@ -238,21 +238,21 @@ Tabs and spaces Fancy list markers ~~~~~~~~~~~~~~~~~~ -2. begins with 2 -3. and now 3 +1. begins with 2 +2. and now 3 + with a continuation -iv. sublist with roman numerals, starting with 4 -v. more items +a. sublist with roman numerals, starting with 4 +b. more items A. a subsublist B. a subsublist Nesting: A. Upper Alpha -I. Upper Roman. -6. Decimal start with 6 -c. Lower alpha with paren +A. Upper Roman. +1. Decimal start with 6 +a. Lower alpha with paren Autonumbering: |
