LaTeX reader: Don't omit macro definitions defined in the preamble.
These were formerly omitted (though they still affected macro resolution if `latex_macros` was set). Now they are included in the document.
This commit is contained in:
parent
15e1ca6441
commit
7fac395284
1 changed files with 7 additions and 6 deletions
|
@ -1462,13 +1462,14 @@ end_ t = try (do
|
|||
guard $ t == txt) <?> ("\\end{" ++ T.unpack t ++ "}")
|
||||
|
||||
preamble :: PandocMonad m => LP m Blocks
|
||||
preamble = mempty <$ many preambleBlock
|
||||
where preambleBlock = spaces1
|
||||
<|> macroDef (const ())
|
||||
<|> void blockCommand
|
||||
<|> void braced
|
||||
preamble = mconcat <$> many preambleBlock
|
||||
where preambleBlock = (mempty <$ spaces1)
|
||||
<|> macroDef (rawBlock "latex")
|
||||
<|> (mempty <$ blockCommand)
|
||||
<|> (mempty <$ braced)
|
||||
<|> (do notFollowedBy (begin_ "document")
|
||||
void anyTok)
|
||||
anyTok
|
||||
return mempty)
|
||||
|
||||
paragraph :: PandocMonad m => LP m Blocks
|
||||
paragraph = do
|
||||
|
|
Loading…
Reference in a new issue