Fixed bug in RST reader, which would choke on: "p. one\ntwo\n".

Added some try's in ordered list parsers.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1191 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2008-01-17 02:14:20 +00:00
parent 8f8888df2e
commit 42359e63c9

View file

@ -378,7 +378,7 @@ indentWith num = do
(try (char '\t' >> count (num - tabStop) (char ' '))) ]
-- parse raw text for one list item, excluding start marker and continuations
rawListItem start = do
rawListItem start = try $ do
markerLength <- start
firstLine <- manyTill anyChar newline
restLines <- many (listLine markerLength)
@ -408,7 +408,7 @@ listItem start = try $ do
updateState (\st -> st {stateParserContext = oldContext})
return parsed
orderedList = do
orderedList = try $ do
(start, style, delim) <- lookAhead (anyOrderedListMarker >>~ spaceChar)
items <- many1 (listItem (orderedListStart style delim))
let items' = compactify items