From bf4f8ffe5516a98c4b2f020fb81f978f052d0ee3 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 12 Nov 2011 13:20:29 -0800 Subject: LaTeX reader: Don't crash on commands like `\itemsep`. Closes #314. --- src/Text/Pandoc/Readers/LaTeX.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') 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") -- cgit v1.2.3