git.iko.soy/typeable/pandoc
on master help sign in
Rewrote 'para' for greater efficiency.
3edf583fiddlosopher
src/Text/Pandoc/Readers/Markdown.hs+4−6
@@ -433,12 +433,10 @@ definitionList = do
433para = try $ do
433para = try $ do
434 result <- many1 inline
434 result <- many1 inline
435 newline
435 newline
436− st <- getState
436+ blanklines <|> do st <- getState
437− if stateStrict st
437+ if stateStrict st
438− then choice [ lookAhead blockQuote, lookAhead header,
438+ then lookAhead (blockQuote <|> header) >> return ""
439− (blanklines >> return Null) ]
440− else choice [ lookAhead emacsBoxQuote >> return Null,
439+ else lookAhead emacsBoxQuote >> return ""
441− (blanklines >> return Null) ]
442 return $ Para $ normalizeSpaces result
440 return $ Para $ normalizeSpaces result
443
441
444plain = many1 inline >>= return . Plain . normalizeSpaces
442plain = many1 inline >>= return . Plain . normalizeSpaces