aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 0cc10c1d4..5f08afe08 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -498,7 +498,7 @@ block = do
, htmlBlock
, table
, codeBlockIndented
- , guardEnabled Ext_latex_macros *> (macro >>= return . return)
+ , latexMacro
, rawTeXBlock
, lineBlock
, blockQuote
@@ -1071,6 +1071,13 @@ rawVerbatimBlock = htmlInBalanced isVerbTag
isVerbTag (TagOpen "script" _) = True
isVerbTag _ = False
+latexMacro :: PandocMonad m => MarkdownParser m (F Blocks)
+latexMacro = try $ do
+ guardEnabled Ext_latex_macros
+ skipNonindentSpaces
+ res <- macro
+ return $ return res
+
rawTeXBlock :: PandocMonad m => MarkdownParser m (F Blocks)
rawTeXBlock = do
guardEnabled Ext_raw_tex