AsciiDoc: Don't use Roman numerals in ordered lists.

AsiiDoc doesn't support them.
This commit is contained in:
John MacFarlane 2011-11-18 21:26:25 -08:00
parent 1561d51cc5
commit bea0fdf6e6
2 changed files with 13 additions and 9 deletions

View file

@ -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

View file

@ -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: