aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-19 16:25:01 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-19 16:25:01 -0700
commit8fd3d0bdbbd8ba8c681c72a401c517797c2ecd0e (patch)
tree8d47ef4acc161364993b2ca182bd97e6f16da96a /src/Text/Pandoc/Writers/LaTeX.hs
parentb43873a9ea07afc698d15559717550f8b46e365c (diff)
downloadpandoc-8fd3d0bdbbd8ba8c681c72a401c517797c2ecd0e.tar.gz
LaTeX writer: make verbatim environments flush to avoid extra space.
The indented `\end{verbatim}` was causing an extra blank line in the output. Closes #277.
Diffstat (limited to 'src/Text/Pandoc/Writers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index f3d7af7e5..ea3d471fe 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -216,8 +216,9 @@ blockToLaTeX (CodeBlock (_,classes,keyvalAttr) str) = do
| null params = empty
| otherwise = "[" <> hsep (intersperse "," (map text params)) <>
"]"
- return $ "\\begin{" <> text env <> "}" <> printParams $$ flush (text str) $$
- "\\end{" <> text env <> "}" $$ cr -- final cr needed because of footnotes
+ return $ flush ("\\begin{" <> text env <> "}" <> printParams $$ text str $$
+ "\\end{" <> text env <> "}") $$ cr
+ -- final cr needed because of footnotes
blockToLaTeX (RawBlock "latex" x) = return $ text x <> blankline
blockToLaTeX (RawBlock _ _) = return empty
blockToLaTeX (BulletList lst) = do