aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-09-22 13:00:59 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-09-22 13:00:59 -0700
commit1038606036a800b8edfd54f96cb8841bf7998872 (patch)
treec4e701efdce447cff269b35ec428e8f0932bddcd /src/Text
parent93c35cbf148dff486c9ccc88c5e78cce55538ffd (diff)
downloadpandoc-1038606036a800b8edfd54f96cb8841bf7998872.tar.gz
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.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
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