git.iko.soy/typeable/pandoc
on master help sign in
AsciiDoc: Don't use Roman numerals in ordered lists.

AsiiDoc doesn't support them.

commitbea0fdf6e6d3f6dab000a6a4b6a0f74776348b98 authorJohn MacFarlane <fiddlosopher@gmail.com> dateFri 18 Nov 2011, 21:26 (15 years ago) parent1561d51
2 files changed+13−9
src/Text/Pandoc/Writers/AsciiDoc.hs+6−2 tests/writer.asciidoc+7−7
src/Text/Pandoc/Writers/AsciiDoc.hs+6−2
@@ -213,8 +213,12 @@ blockToAsciiDoc opts (Table caption aligns widths headers rows) = do
213213blockToAsciiDoc opts (BulletList items) = do
214214 contents <- mapM (bulletListItemToAsciiDoc opts) items
215215 return $ cat contents <> blankline
216−blockToAsciiDoc opts (OrderedList (start, sty, _delim) items) = do
217− let markers = orderedListMarkers (start, sty, Period)
216+blockToAsciiDoc opts (OrderedList (_start, sty, _delim) items) = do
217+ let sty' = case sty of
218+ UpperRoman -> UpperAlpha
219+ LowerRoman -> LowerAlpha
220+ x -> x
221+ let markers = orderedListMarkers (1, sty', Period) -- start num not used
218222 let markers' = map (\m -> if length m < 3
219223 then m ++ replicate (3 - length m) ' '
220224 else m) markers
tests/writer.asciidoc+7−7
@@ -238,21 +238,21 @@ Tabs and spaces
238238Fancy list markers
239239~~~~~~~~~~~~~~~~~~
240240
241−2. begins with 2
242−3. and now 3
241+1. begins with 2
242+2. and now 3
243243+
244244with a continuation
245−iv. sublist with roman numerals, starting with 4
246−v. more items
245+a. sublist with roman numerals, starting with 4
246+b. more items
247247A. a subsublist
248248B. a subsublist
249249
250250Nesting:
251251
252252A. Upper Alpha
253−I. Upper Roman.
254−6. Decimal start with 6
255−c. Lower alpha with paren
253+A. Upper Roman.
254+1. Decimal start with 6
255+a. Lower alpha with paren
256256
257257Autonumbering:
258258