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
|
parseBlocks = mconcat <$> manyTill block eof
|
||||||
|
|
||||||
block :: MarkdownParser (F Blocks)
|
block :: MarkdownParser (F Blocks)
|
||||||
block = choice [ codeBlockFenced
|
block = choice [ mempty <$ blanklines
|
||||||
|
, codeBlockFenced
|
||||||
, guardEnabled Ext_latex_macros *> (macro >>= return . return)
|
, guardEnabled Ext_latex_macros *> (macro >>= return . return)
|
||||||
, header
|
, header
|
||||||
, lhsCodeBlock
|
, lhsCodeBlock
|
||||||
|
@ -376,7 +377,6 @@ block = choice [ codeBlockFenced
|
||||||
, noteBlock
|
, noteBlock
|
||||||
, referenceKey
|
, referenceKey
|
||||||
, abbrevKey
|
, abbrevKey
|
||||||
, mempty <$ blanklines
|
|
||||||
, para
|
, para
|
||||||
, plain
|
, plain
|
||||||
] <?> "block"
|
] <?> "block"
|
||||||
|
|
Loading…
Reference in a new issue