aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-09-09 18:21:53 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-09-09 18:21:53 -0700
commitccf314829b539762447dc67e506e77c03d3b6e05 (patch)
tree5286013c9b3f4966b8a68c1add423bd5c8915a5f /src/Text/Pandoc
parent579cdac64139e8decc67172c0cb384de6f1bfc3b (diff)
downloadpandoc-ccf314829b539762447dc67e506e77c03d3b6e05.tar.gz
LaTeX reader: Guard against "begin", "end" in inlineCommand.
Removed these from list of inline commands.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 4a9ac8a41..64696d053 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -265,8 +265,6 @@ blockCommands = M.fromList $
, ("closing", skipopts *> closing)
--
, ("rule", skipopts *> tok *> tok *> pure horizontalRule)
- , ("begin", mzero) -- these are here so they won't be interpreted as inline
- , ("end", mzero)
, ("item", skipopts *> loose_item)
, ("documentclass", skipopts *> braced *> preamble)
, ("centerline", (para . trimInlines) <$> (skipopts *> tok))
@@ -321,6 +319,7 @@ section lvl = do
inlineCommand :: LP Inlines
inlineCommand = try $ do
name <- anyControlSeq
+ guard $ name /= "begin" && name /= "end"
guard $ not $ isBlockCommand name
parseRaw <- getOption readerParseRaw
star <- option "" (string "*")