aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-09-06 16:27:01 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-09-06 16:27:01 -0700
commit7d0438897b0df6cc861c9fc679ceeb976cb24c1a (patch)
treedfaa0d928139166746660f24b9f8a7f1e900c318 /src/Text/Pandoc/Readers/LaTeX.hs
parente2cc9e7ca1cfc095482c72bee6684b5897e82445 (diff)
downloadpandoc-7d0438897b0df6cc861c9fc679ceeb976cb24c1a.tar.gz
LaTeX reader: Support obeylines environment.
Closes #604.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index b9b4e86fc..4a9ac8a41 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -742,6 +742,9 @@ environments = M.fromList
, ("lstlisting", codeBlock <$> (verbEnv "lstlisting"))
, ("minted", liftA2 (\l c -> codeBlockWith ("",[l],[]) c)
(grouped (many1 $ satisfy (/= '}'))) (verbEnv "minted"))
+ , ("obeylines", parseFromString
+ (para . trimInlines . mconcat <$> many inline) =<<
+ intercalate "\\\\\n" . lines <$> verbEnv "obeylines")
, ("displaymath", mathEnv Nothing "displaymath")
, ("equation", mathEnv Nothing "equation")
, ("equation*", mathEnv Nothing "equation*")