Markdown reader: Check for blank lines first in blocks.
(And skip them. This might speed things up in some cases.)
This commit is contained in:
parent
f2c3335642
commit
e3b8b89d31
1 changed files with 2 additions and 2 deletions
|
@ -359,7 +359,8 @@ parseBlocks :: MarkdownParser (F Blocks)
|
|||
parseBlocks = mconcat <$> manyTill block eof
|
||||
|
||||
block :: MarkdownParser (F Blocks)
|
||||
block = choice [ codeBlockFenced
|
||||
block = choice [ mempty <$ blanklines
|
||||
, codeBlockFenced
|
||||
, guardEnabled Ext_latex_macros *> (macro >>= return . return)
|
||||
, header
|
||||
, lhsCodeBlock
|
||||
|
@ -376,7 +377,6 @@ block = choice [ codeBlockFenced
|
|||
, noteBlock
|
||||
, referenceKey
|
||||
, abbrevKey
|
||||
, mempty <$ blanklines
|
||||
, para
|
||||
, plain
|
||||
] <?> "block"
|
||||
|
|
Loading…
Reference in a new issue