git.iko.soy/typeable/pandoc
on master help sign in
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

commit32f357c1108306b35a8d7ccbf2503a733ca9b529 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 28 Jun 2009, 01:38 (17 years ago) parent313405f
3 files changed+12−2
src/Text/Pandoc/Shared.hs+3−2 tests/rst-reader.native+4 tests/rst-reader.rst+5
src/Text/Pandoc/Shared.hs+3−2
@@ -612,8 +612,9 @@ orderedListMarker :: ListNumberStyle
612612 -> ListNumberDelim
613613 -> GenParser Char st Int
614614orderedListMarker style delim = do
615− let num = case style of
616− DefaultStyle -> decimal <|> defaultNum
615+ let num = defaultNum <|> -- # can continue any kind of list
616+ case style of
617+ DefaultStyle -> decimal
617618 Decimal -> decimal
618619 UpperRoman -> upperRoman
619620 LowerRoman -> lowerRoman
tests/rst-reader.native+4
@@ -146,6 +146,10 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str
146146 , OrderedList (1,DefaultStyle,DefaultDelim)
147147 [ [ Plain [Str "Nested."] ]
148148 ] ] ]
149+, Para [Str "Autonumbering",Space,Str "with",Space,Str "explicit",Space,Str "start",Str ":"]
150+, OrderedList (4,LowerAlpha,TwoParens)
151+ [ [ Plain [Str "item",Space,Str "1"] ]
152+ , [ Plain [Str "item",Space,Str "2"] ] ]
149153, Header 2 [Str "Definition"]
150154, DefinitionList
151155 [ ([Str "term",Space,Str "1"],
tests/rst-reader.rst+5
@@ -242,6 +242,11 @@ Autonumbering:
242242
243243 #. Nested.
244244
245+Autonumbering with explicit start:
246+
247+(d) item 1
248+(#) item 2
249+
245250Definition
246251----------
247252