From 1038606036a800b8edfd54f96cb8841bf7998872 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 22 Sep 2012 13:00:59 -0700 Subject: LaTeX reader: Added a 'try' in rawLaTeXBlock. This allows the markdown reader to treat '\begin' (not followed by an argument) as a raw string rather than erroring out when it doesn't find a '{'. Closes #622. --- src/Text/Pandoc/Readers/LaTeX.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 86ae400de..c3854bc3e 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -713,7 +713,7 @@ verbatimEnv = do return (r,rest) rawLaTeXBlock :: Parser [Char] ParserState String -rawLaTeXBlock = snd <$> withRaw (environment <|> blockCommand) +rawLaTeXBlock = snd <$> try (withRaw (environment <|> blockCommand)) rawLaTeXInline :: Parser [Char] ParserState Inline rawLaTeXInline = do -- cgit v1.2.3