aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-02-09 14:30:04 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2012-02-09 14:30:37 -0800
commit5ac6f88e34a9a7b890d74695b241220718ef18f5 (patch)
treef25fac102a7b5e8816f2258ca8d4b7ec87233c20
parentc8cadbf5f3876fce8cc38e2b080cb698c9f94927 (diff)
downloadpandoc-5ac6f88e34a9a7b890d74695b241220718ef18f5.tar.gz
Better handling of raw latex environments in markdown.
Now \begin{equation} a_1 \end{equation} turns into a raw latex block as expected.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index ba5676619..b5cb5ef9d 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -648,15 +648,7 @@ verbatimEnv = do
return (r,rest)
rawLaTeXBlock :: GenParser Char ParserState String
-rawLaTeXBlock =
- (rawLaTeXEnvironment <|> (snd <$> withRaw blockCommand)) >>= applyMacros'
-
-rawLaTeXEnvironment :: GenParser Char ParserState String
-rawLaTeXEnvironment = try $ do
- controlSeq "begin"
- name <- braced
- let addBegin x = "\\begin{" ++ name ++ "}" ++ x
- addBegin <$> (withRaw (env name blocks) >>= applyMacros' . snd)
+rawLaTeXBlock = snd <$> withRaw (environment <|> blockCommand)
rawLaTeXInline :: GenParser Char ParserState Inline
rawLaTeXInline = do