git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: Fixed spacing in quote environments.

Closes #502. Previously you'd get: ~~~ hi \begin{quote} hi \end{quote} hi ~~~ Now we get: ~~~ hi \begin{quote} hi \end{quote} hi ~~~

commit8201257b5c13f90f14aa529fac1b341fd1a900eb authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 30 Apr 2012, 07:46 (14 years ago) parent8d64109
4 files changed+8−9
src/Text/Pandoc/Writers/LaTeX.hs+2−1 tests/lhs-test.latex−1 tests/lhs-test.latex+lhs−1 tests/writer.latex+6−6
src/Text/Pandoc/Writers/LaTeX.hs+2−1
@@ -278,7 +278,8 @@ blockToLaTeX (BlockQuote lst) = do
278278 return result
279279 _ -> do
280280 contents <- blockListToLaTeX lst
281− return $ "\\begin{quote}" $$ contents $$ "\\end{quote}"
281+ return $ "\\begin{quote}" $$ chomp contents $$ "\\end{quote}"
282+ <> blankline
282283blockToLaTeX (CodeBlock (_,classes,keyvalAttr) str) = do
283284 opts <- gets stOptions
284285 case () of
tests/lhs-test.latex−1
@@ -86,7 +86,6 @@ Block quote:
8686
8787\begin{quote}
8888foo bar
89−
9089\end{quote}
9190
9291\end{document}
tests/lhs-test.latex+lhs−1
@@ -66,7 +66,6 @@ Block quote:
6666
6767\begin{quote}
6868foo bar
69−
7069\end{quote}
7170
7271\end{document}
tests/writer.latex+6−6
@@ -119,8 +119,8 @@ E-mail style:
119119
120120\begin{quote}
121121This is a block quote. It is pretty short.
122−
123122\end{quote}
123+
124124\begin{quote}
125125Code in a block quote:
126126
@@ -141,13 +141,13 @@ Nested block quotes:
141141
142142\begin{quote}
143143nested
144−
145144\end{quote}
145+
146146\begin{quote}
147147nested
148−
149148\end{quote}
150149\end{quote}
150+
151151This should not be a block quote: 2 \textgreater{} 1.
152152
153153And a following paragraph.
@@ -476,8 +476,8 @@ orange fruit
476476\end{verbatim}
477477\begin{quote}
478478orange block quote
479−
480479\end{quote}
480+
481481\end{description}
482482Multiple definitions, tight:
483483
@@ -809,8 +809,8 @@ An e-mail address:
809809
810810\begin{quote}
811811Blockquoted: \url{http://example.com/}
812−
813812\end{quote}
813+
814814Auto-links should not occur here:
815815\texttt{\textless{}http://example.com/\textgreater{}}
816816
@@ -855,8 +855,8 @@ note.\footnote{This is \emph{easier} to type. Inline notes may contain
855855
856856\begin{quote}
857857Notes can go in quotes.\footnote{In quote.}
858−
859858\end{quote}
859+
860860\begin{enumerate}[1.]
861861\item
862862 And in list items.\footnote{In list.}