aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-01-17 02:14:20 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-01-17 02:14:20 +0000
commit42359e63c9a7ddeb67e639296fc20a1e3eaac7dc (patch)
treec8735dbcdb218770a3855751ccf23ac63c3cd462
parent8f8888df2e2d7b07df2f9d632521852c20356202 (diff)
downloadpandoc-42359e63c9a7ddeb67e639296fc20a1e3eaac7dc.tar.gz
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
-rw-r--r--Text/Pandoc/Readers/RST.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Text/Pandoc/Readers/RST.hs b/Text/Pandoc/Readers/RST.hs
index 8e112814f..30d867e38 100644
--- a/Text/Pandoc/Readers/RST.hs
+++ b/Text/Pandoc/Readers/RST.hs
@@ -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