From e48f046aa024fea9f806368796eaaaed1f09ceaf Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 18 Aug 2007 15:26:29 +0000 Subject: + Fixed bug in markdown ordered list parsing. The problem was that anyOrderedListStart did not check for a space following the ordered list marker. So, 'A.B. 2007' would be parsed as a list item, then fail because of the lack of space after 'A.' (required by orderedListStart). Resolves Issue #22. + Fixed a similar problem in RST reader. + Added regression test. git-svn-id: https://pandoc.googlecode.com/svn/trunk@861 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/Markdown.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Readers/Markdown.hs') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 6ee8df7b6..abf8061e0 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -334,8 +334,9 @@ anyOrderedListStart = try $ do if stateStrict state then do many1 digit char '.' + spaceChar return (1, DefaultStyle, DefaultDelim) - else anyOrderedListMarker + else anyOrderedListMarker >>~ spaceChar orderedListStart style delim = try $ do optional newline -- if preceded by a Plain block in a list context @@ -346,7 +347,7 @@ orderedListStart style delim = try $ do char '.' return 1 else orderedListMarker style delim - oneOf spaceChars + spaceChar skipSpaces -- parse a line of a list item (start = parser for beginning of list item) -- cgit v1.2.3