aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-11-12 13:20:29 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-11-12 13:20:29 -0800
commitbf4f8ffe5516a98c4b2f020fb81f978f052d0ee3 (patch)
tree12472e35e2097ecd5ae314f026160873cfd2351c /src/Text/Pandoc
parentda57775171d3575816f9b6a0d77fe6872e5d89b7 (diff)
downloadpandoc-bf4f8ffe5516a98c4b2f020fb81f978f052d0ee3.tar.gz
LaTeX reader: Don't crash on commands like `\itemsep`.
Closes #314.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index c965c65ce..a6b7cc19a 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -511,7 +511,8 @@ demacro (n,st,args) = try $ do
unknownCommand :: GenParser Char ParserState Block
unknownCommand = try $ do
spaces
- notFollowedBy' $ oneOfStrings ["\\begin","\\end","\\item"]
+ notFollowedBy' $ oneOfStrings ["\\begin","\\end","\\item"] >>
+ notFollowedBy letter
state <- getState
when (stateParserContext state == ListItemState) $
notFollowedBy' (string "\\item")