RST reader: Allow # to continue list...

...even if the list was started with an explicit
marker.  For example:

    A.  my list
    #.  continued

Resolves Issue #140.  Test case also added.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1584 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher
2009-06-28 01:38:40 +00:00
parent 313405f59a
commit 32f357c110
3 changed files with 12 additions and 2 deletions
+3 -2
View File
@@ -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
+4
View File
@@ -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"],
+5
View File
@@ -242,6 +242,11 @@ Autonumbering:
#. Nested.
Autonumbering with explicit start:
(d) item 1
(#) item 2
Definition
----------