git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: fixed parsing bug with macros.

Previously macro definitions in indented code blocks were being parsed as macro definitions, not code.

commite20f433f383b7087da7527103b81e7432d7e8356 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 18 Dec 2015, 23:59 (11 years ago) parentad3ef55
1 file changed+1−1
src/Text/Pandoc/Readers/Markdown.hs+1−1
src/Text/Pandoc/Readers/Markdown.hs+1−1
@@ -484,7 +484,6 @@ block = do
484484 res <- choice [ mempty <$ blanklines
485485 , codeBlockFenced
486486 , yamlMetaBlock
487− , guardEnabled Ext_latex_macros *> (macro >>= return . return)
488487 -- note: bulletList needs to be before header because of
489488 -- the possibility of empty list items: -
490489 , bulletList
@@ -494,6 +493,7 @@ block = do
494493 , htmlBlock
495494 , table
496495 , codeBlockIndented
496+ , guardEnabled Ext_latex_macros *> (macro >>= return . return)
497497 , rawTeXBlock
498498 , lineBlock
499499 , blockQuote