Markdown reader: allow latex macro definitions indented 1-3 spaces.

Previously they only worked if nonindented.
This commit is contained in:
John MacFarlane 2017-03-22 21:18:55 +01:00
parent 9437ab449c
commit f4ac0edf2a

View file

@ -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