git.iko.soy/typeable/pandoc
on master help sign in
Support "minted" as a LaTeX verbatim block.

Closes #431.

commitc5fb21d5249270bb8f1a092ac0ce14a4e4069d5a authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 27 Feb 2012, 11:37 (15 years ago) parentbf4e59b
1 file changed+3−1
src/Text/Pandoc/Readers/LaTeX.hs+3−1
src/Text/Pandoc/Readers/LaTeX.hs+3−1
@@ -685,7 +685,7 @@ verbatimEnv = do
685685 controlSeq "begin"
686686 name <- braced
687687 guard $ name == "verbatim" || name == "Verbatim" ||
688− name == "lstlisting"
688+ name == "lstlisting" || name == "minted"
689689 verbEnv name
690690 rest <- getInput
691691 return (r,rest)
@@ -718,6 +718,8 @@ environments = M.fromList
718718 , ("verbatim", codeBlock <$> (verbEnv "verbatim"))
719719 , ("Verbatim", codeBlock <$> (verbEnv "Verbatim"))
720720 , ("lstlisting", codeBlock <$> (verbEnv "listlisting"))
721+ , ("minted", liftA2 (\l c -> codeBlockWith ("",[l],[]) c)
722+ (grouped (many1 $ satisfy (/= '}'))) (verbEnv "minted"))
721723 , ("displaymath", mathEnv Nothing "displaymath")
722724 , ("equation", mathEnv Nothing "equation")
723725 , ("equation*", mathEnv Nothing "equation*")