diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 043d7e94c..92cf9a22e 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -81,17 +81,10 @@ readMarkdownWithWarnings :: ReaderOptions -- ^ Reader options -> (Pandoc, [String]) readMarkdownWithWarnings opts s = runMarkdown opts s (returnWarnings parseMarkdown) - -retState :: MarkdownParser a -> MarkdownParser (a, ParserState) -retState p = do - r <- p - s <- getState - return (r, s) - runMarkdown :: ReaderOptions -> String -> MarkdownParser a -> a runMarkdown opts inp p = fst res where - imd = readWithM (retState p) def{ stateOptions = opts } (inp ++ "\n\n") + imd = readWithM (returnState p) def{ stateOptions = opts } (inp ++ "\n\n") res = runReader imd s s :: ParserState s = snd $ runReader imd s |