LaTeX reader: don't assume preamble doesn't contain environments.

Closes #1338.
This commit is contained in:
John MacFarlane 2014-06-16 17:43:56 -07:00
parent 31fd843133
commit 459805de4c

View file

@ -1134,7 +1134,7 @@ paragraph = do
preamble :: LP Blocks
preamble = mempty <$> manyTill preambleBlock beginDoc
where beginDoc = lookAhead $ controlSeq "begin" *> string "{document}"
where beginDoc = lookAhead $ try $ controlSeq "begin" *> string "{document}"
preambleBlock = (void comment)
<|> (void sp)
<|> (void blanklines)