aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-06-16 17:43:56 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-06-16 17:43:56 -0700
commit459805de4c4e7129dc624086a654febb161f99ad (patch)
treeeef588badd650961784eb7a67792de762d6607ca /src/Text/Pandoc
parent31fd843133ee9482b6af353a7d793cae18929425 (diff)
downloadpandoc-459805de4c4e7129dc624086a654febb161f99ad.tar.gz
LaTeX reader: don't assume preamble doesn't contain environments.
Closes #1338.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 6b5958920..9e7a38b8f 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -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)