LaTeX reader: Ensure that preamble doesn't contribute to text of doc.
This commit is contained in:
parent
de10b1653e
commit
1a55c8f5de
1 changed files with 8 additions and 8 deletions
|
@ -1037,14 +1037,14 @@ paragraph = do
|
|||
preamble :: LP Blocks
|
||||
preamble = mempty <$> manyTill preambleBlock beginDoc
|
||||
where beginDoc = lookAhead $ controlSeq "begin" *> string "{document}"
|
||||
preambleBlock = (mempty <$ comment)
|
||||
<|> (mempty <$ sp)
|
||||
<|> (mempty <$ blanklines)
|
||||
<|> (mempty <$ macro)
|
||||
<|> blockCommand
|
||||
<|> (mempty <$ anyControlSeq)
|
||||
<|> (mempty <$ braced)
|
||||
<|> (mempty <$ anyChar)
|
||||
preambleBlock = (void comment)
|
||||
<|> (void sp)
|
||||
<|> (void blanklines)
|
||||
<|> (void macro)
|
||||
<|> (void blockCommand)
|
||||
<|> (void anyControlSeq)
|
||||
<|> (void braced)
|
||||
<|> (void anyChar)
|
||||
|
||||
-------
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue