diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-29 00:08:18 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-29 00:08:18 +0000 |
commit | 3edf5834e836a71327d8a607a56dbcbd46deb745 (patch) | |
tree | 71af3a32d20dd20c7a7a5b114e2ae6ba98654b9f /src/Text/Pandoc | |
parent | 902d6c7115c46858580fedb5cb785a1d58941ca4 (diff) | |
download | pandoc-3edf5834e836a71327d8a607a56dbcbd46deb745.tar.gz |
Rewrote 'para' for greater efficiency.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@948 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 93806f18f..82a1d6bb4 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -433,12 +433,10 @@ definitionList = do para = try $ do result <- many1 inline newline - st <- getState - if stateStrict st - then choice [ lookAhead blockQuote, lookAhead header, - (blanklines >> return Null) ] - else choice [ lookAhead emacsBoxQuote >> return Null, - (blanklines >> return Null) ] + blanklines <|> do st <- getState + if stateStrict st + then lookAhead (blockQuote <|> header) >> return "" + else lookAhead emacsBoxQuote >> return "" return $ Para $ normalizeSpaces result plain = many1 inline >>= return . Plain . normalizeSpaces |