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
|
, htmlBlock
|
||||||
, table
|
, table
|
||||||
, codeBlockIndented
|
, codeBlockIndented
|
||||||
, guardEnabled Ext_latex_macros *> (macro >>= return . return)
|
, latexMacro
|
||||||
, rawTeXBlock
|
, rawTeXBlock
|
||||||
, lineBlock
|
, lineBlock
|
||||||
, blockQuote
|
, blockQuote
|
||||||
|
@ -1071,6 +1071,13 @@ rawVerbatimBlock = htmlInBalanced isVerbTag
|
||||||
isVerbTag (TagOpen "script" _) = True
|
isVerbTag (TagOpen "script" _) = True
|
||||||
isVerbTag _ = False
|
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 :: PandocMonad m => MarkdownParser m (F Blocks)
|
||||||
rawTeXBlock = do
|
rawTeXBlock = do
|
||||||
guardEnabled Ext_raw_tex
|
guardEnabled Ext_raw_tex
|
||||||
|
|
Loading…
Reference in a new issue