From c5fb21d5249270bb8f1a092ac0ce14a4e4069d5a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 27 Feb 2012 11:37:54 -0800 Subject: Support "minted" as a LaTeX verbatim block. Closes #431. --- src/Text/Pandoc/Readers/LaTeX.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 78a29a3f5..9f5c8d666 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -685,7 +685,7 @@ verbatimEnv = do controlSeq "begin" name <- braced guard $ name == "verbatim" || name == "Verbatim" || - name == "lstlisting" + name == "lstlisting" || name == "minted" verbEnv name rest <- getInput return (r,rest) @@ -718,6 +718,8 @@ environments = M.fromList , ("verbatim", codeBlock <$> (verbEnv "verbatim")) , ("Verbatim", codeBlock <$> (verbEnv "Verbatim")) , ("lstlisting", codeBlock <$> (verbEnv "listlisting")) + , ("minted", liftA2 (\l c -> codeBlockWith ("",[l],[]) c) + (grouped (many1 $ satisfy (/= '}'))) (verbEnv "minted")) , ("displaymath", mathEnv Nothing "displaymath") , ("equation", mathEnv Nothing "equation") , ("equation*", mathEnv Nothing "equation*") -- cgit v1.2.3