@@ -142,14 +142,16 @@ parseMarkdown = do
142142 startPos <- getPosition
143143 -- go through once just to get list of reference keys
144144 -- 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+ return . concat
146147 setInput docMinusKeys
147148 setPosition startPos
148149 st <- getState
149150 -- go through again for notes unless strict...
150151 if stateStrict st
151152 then return ()
152− else do docMinusNotes <- many (noteBlock <|> lineClump) >>= return . concat
153+ else do docMinusNotes <- manyTill (noteBlock <|> lineClump) eof >>=
154+ return . concat
153155 st <- getState
154156 let reversedNotes = stateNotes st
155157 updateState $ \st -> st { stateNotes = reverse reversedNotes }