Merge branch 'master' into citeproc
This commit is contained in:
commit
4c21c5566d
1 changed files with 3 additions and 0 deletions
|
@ -320,6 +320,9 @@ atxClosing = try $ skipMany (char '#') >> blanklines
|
|||
|
||||
setextHeader :: GenParser Char ParserState Block
|
||||
setextHeader = try $ do
|
||||
-- This lookahead prevents us from wasting time parsing Inlines
|
||||
-- unless necessary -- it gives a significant performance boost.
|
||||
lookAhead $ anyLine >> many1 (oneOf setextHChars) >> blankline
|
||||
text <- many1Till inline newline
|
||||
underlineChar <- oneOf setextHChars
|
||||
many (char underlineChar)
|
||||
|
|
Loading…
Reference in a new issue