aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-10-11 22:43:47 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-10-11 22:43:47 -0700
commit1a55c8f5de357f36885e0ac5c50cdc8b6cafc211 (patch)
tree4bfb15154cafc4d88f627daf049bd1f092f75aed
parentde10b1653e0624d91bc9b0b96d2f84c4673c6d98 (diff)
downloadpandoc-1a55c8f5de357f36885e0ac5c50cdc8b6cafc211.tar.gz
LaTeX reader: Ensure that preamble doesn't contribute to text of doc.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index d22430eb9..762150dba 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -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)
-------