Markdown reader: allow latex macro definitions indented 1-3 spaces.
Previously they only worked if nonindented.
This commit is contained in:
parent
9437ab449c
commit
f4ac0edf2a
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue