@@ -142,14 +142,16 @@ parseMarkdown = do
142 startPos <- getPosition
142 startPos <- getPosition
143 -- go through once just to get list of reference keys
143 -- go through once just to get list of reference keys
144 -- docMinusKeys is the raw document with blanks where the keys were...
144 -- docMinusKeys is the raw document with blanks where the keys were...
145− docMinusKeys <- many (referenceKey <|> lineClump) >>= return . concat
145+ docMinusKeys <- manyTill (referenceKey <|> lineClump) eof >>=
146 setInput docMinusKeys
147 setInput docMinusKeys
147 setPosition startPos
148 setPosition startPos
148 st <- getState
149 st <- getState
149 -- go through again for notes unless strict...
150 -- go through again for notes unless strict...
150 if stateStrict st
151 if stateStrict st
151 then return ()
152 then return ()
152− else do docMinusNotes <- many (noteBlock <|> lineClump) >>= return . concat
153+ else do docMinusNotes <- manyTill (noteBlock <|> lineClump) eof >>=
153 st <- getState
155 st <- getState
154 let reversedNotes = stateNotes st
156 let reversedNotes = stateNotes st
155 updateState $ \st -> st { stateNotes = reverse reversedNotes }
157 updateState $ \st -> st { stateNotes = reverse reversedNotes }