From 3edf5834e836a71327d8a607a56dbcbd46deb745 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 29 Aug 2007 00:08:18 +0000 Subject: Rewrote 'para' for greater efficiency. git-svn-id: https://pandoc.googlecode.com/svn/trunk@948 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/Markdown.hs | 10 ++++------ 1 file 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 -- cgit v1.2.3