aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Shared.hs5
-rw-r--r--tests/rst-reader.native4
-rw-r--r--tests/rst-reader.rst5
3 files changed, 12 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 82ae08601..b67e169c8 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -612,8 +612,9 @@ orderedListMarker :: ListNumberStyle
-> ListNumberDelim
-> GenParser Char st Int
orderedListMarker style delim = do
- let num = case style of
- DefaultStyle -> decimal <|> defaultNum
+ let num = defaultNum <|> -- # can continue any kind of list
+ case style of
+ DefaultStyle -> decimal
Decimal -> decimal
UpperRoman -> upperRoman
LowerRoman -> lowerRoman
diff --git a/tests/rst-reader.native b/tests/rst-reader.native
index 88a036ebc..8848fa111 100644
--- a/tests/rst-reader.native
+++ b/tests/rst-reader.native
@@ -146,6 +146,10 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str
, OrderedList (1,DefaultStyle,DefaultDelim)
[ [ Plain [Str "Nested."] ]
] ] ]
+, Para [Str "Autonumbering",Space,Str "with",Space,Str "explicit",Space,Str "start",Str ":"]
+, OrderedList (4,LowerAlpha,TwoParens)
+ [ [ Plain [Str "item",Space,Str "1"] ]
+ , [ Plain [Str "item",Space,Str "2"] ] ]
, Header 2 [Str "Definition"]
, DefinitionList
[ ([Str "term",Space,Str "1"],
diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst
index 2fcb4a5b9..2cc99d294 100644
--- a/tests/rst-reader.rst
+++ b/tests/rst-reader.rst
@@ -242,6 +242,11 @@ Autonumbering:
#. Nested.
+Autonumbering with explicit start:
+
+(d) item 1
+(#) item 2
+
Definition
----------