diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-15 01:43:12 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-15 01:43:12 +0000 |
commit | 87eb8be14348354473f7a209be91189480f29d8a (patch) | |
tree | 3662b44eca660cd4b1e5b4052e40dc4d9d185f6b /src/Text/Pandoc/Readers/Markdown.hs | |
parent | 9ad7c73b577fa2286084c559f5dba670f93ae24e (diff) | |
download | pandoc-87eb8be14348354473f7a209be91189480f29d8a.tar.gz |
Got rid of two unneeded 'getState's. Note that
lookAhead automatically saves and restores the state.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@538 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 91f437372..3b2cdcdf5 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -170,12 +170,11 @@ parseMarkdown = do updateState (\state -> state { stateParseRaw = True }) -- need to parse raw HTML, since markdown allows it (title, author, date) <- option ([],[],"") titleBlock - oldState <- getState -- go through once just to get list of reference keys keysUsed <- lookAhead $ (do {manyTill (referenceKey <|> (do{anyLine; return Null})) eof; newState <- getState; return $ stateKeysUsed newState}) - setState (oldState { stateKeysUsed = keysUsed }) + updateState (\st -> st { stateKeysUsed = keysUsed }) blocks <- parseBlocks -- go through again, for real let blocks' = filter (/= Null) blocks state <- getState |