diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-02-27 11:37:54 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-02-27 11:37:54 -0800 |
commit | c5fb21d5249270bb8f1a092ac0ce14a4e4069d5a (patch) | |
tree | e4e3040e36a2dbe4fd4a94d9d484023346dd776e /src | |
parent | bf4e59bc4640b3533790a5b8c623f33a586ae729 (diff) | |
download | pandoc-c5fb21d5249270bb8f1a092ac0ce14a4e4069d5a.tar.gz |
Support "minted" as a LaTeX verbatim block.
Closes #431.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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*") |