From bd7f5f3f7c2e699d021628d995b931b37423b93a Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 10 Nov 2007 21:44:05 +0000 Subject: Fixed bug in LaTeX reader (pointed out by Mark Eli Kalderon): needed a "try" before "string" in parser for \[ math blocks. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1068 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/LaTeX.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 37cc2bfe4..79f9fc0f7 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -204,7 +204,8 @@ blockQuote = (environment "quote" <|> environment "quotation") >>~ spaces >>= mathBlock = mathBlockWith (begin "equation") (end "equation") <|> mathBlockWith (begin "displaymath") (end "displaymath") <|> - mathBlockWith (string "\\[") (string "\\]") "math block" + mathBlockWith (try $ string "\\[") (try $ string "\\]") + "math block" mathBlockWith start end = try $ do start -- cgit v1.2.3