diff options
author | ARATA Mizuki <minorinoki@gmail.com> | 2015-11-08 02:24:25 +0900 |
---|---|---|
committer | ARATA Mizuki <minorinoki@gmail.com> | 2015-11-08 02:24:25 +0900 |
commit | 94500f7469ec57ba4363167c1a47a043600aedb7 (patch) | |
tree | 4a261f0a65ad12824b214ae49037a9bb3dae0f64 | |
parent | da056191182777c4e4e951d3aae49c6428677fc7 (diff) | |
download | pandoc-94500f7469ec57ba4363167c1a47a043600aedb7.tar.gz |
LaTeX reader: Handle `comment` environment.
The `comment` environment is handled in a similar way to the `verbatim` environment, except that its content is discarded.
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 359661c3e..a6db6ffad 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -886,7 +886,7 @@ verbatimEnv' = fmap snd <$> string "\\begin" name <- braced' guard $ name `elem` ["verbatim", "Verbatim", "lstlisting", - "minted", "alltt"] + "minted", "alltt", "comment"] manyTill anyChar (try $ string $ "\\end{" ++ name ++ "}") blob' :: IncludeParser @@ -1039,6 +1039,7 @@ environments = M.fromList , ("code", guardEnabled Ext_literate_haskell *> (codeBlockWith ("",["sourceCode","literate","haskell"],[]) <$> verbEnv "code")) + , ("comment", mempty <$ verbEnv "comment") , ("verbatim", codeBlock <$> verbEnv "verbatim") , ("Verbatim", do options <- option [] keyvals let kvs = [ (if k == "firstnumber" |