From 9ad7c73b577fa2286084c559f5dba670f93ae24e Mon Sep 17 00:00:00 2001
From: fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
Date: Thu, 15 Feb 2007 01:33:35 +0000
Subject: Use lookAhead instead of getInput/setInput in RST reader.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@537 788f1e2b-df1e-0410-8736-df70ead52e1b
---
 src/Text/Pandoc/Readers/RST.hs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'src/Text')

diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index 70d55476e..876a7ef75 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -101,13 +101,11 @@ titleTransform blocks = (blocks, [])
 
 parseRST = do
   state <- getState
-  input <- getInput
   -- first pass: get anonymous keys
-  keyBlocks <- manyTill (anonymousKey <|> (do{anyLine; return Null})) eof
+  keyBlocks <- lookAhead $ manyTill (anonymousKey <|> (do{anyLine; return Null})) eof
   let anonymousKeys = filter (/= Null) keyBlocks
   -- run parser again to fill in anonymous links...
   setState (state { stateKeyBlocks = anonymousKeys })
-  setInput input
   blocks <- parseBlocks
   let blocks' = filter isNotAnonKeyBlock blocks
   let (blocks'', title) = if stateStandalone state
-- 
cgit v1.2.3