aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-09-09 18:27:52 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-09-09 18:27:52 -0700
commit14dba12f9058790a5ea4d29d44e044b5f1213c23 (patch)
tree9aac2d7563b069cc7e604c93339ac276bf89e97c /src
parentccf314829b539762447dc67e506e77c03d3b6e05 (diff)
downloadpandoc-14dba12f9058790a5ea4d29d44e044b5f1213c23.tar.gz
LaTeX reader: guard against "begin"/"end" in blockCommand.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 64696d053..b0a3a97e6 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -214,6 +214,7 @@ blocks = mconcat <$> many block
blockCommand :: LP Blocks
blockCommand = try $ do
name <- anyControlSeq
+ guard $ name /= "begin" && name /= "end"
star <- option "" (string "*" <* optional sp)
let name' = name ++ star
case M.lookup name' blockCommands of