Rewrote 'para' for greater efficiency.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@948 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-08-29 00:08:18 +00:00
parent 902d6c7115
commit 3edf5834e8

View file

@ -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