It appears that the Markdown reader, as a rule, treats any unknown environment as block-level content (rather than inline). While this seems to be the desired behaviour, it has side effects when the output format is (newline-sensitive) LaTeX. This was previously reported here:
This affects users wanting to create LaTeX documents in a convenient fashion by first writing a Markdown file containing occasional LaTeX environments, then converting to LaTeX and feeding the resulting LaTeX into a pdflatex workflow. The extra newlines produced in this process affect the LaTeX parsing, leading to unwanted (and inconsistent) vertical space in the final document (see simple example below).

Is there a way to make Pandoc omit the newlines?

$ cat test.md
Testing environment
\begin{equation}
    i
^2=-1
\end{equation}
for whitespace.
$ pandoc
-f markdown -t latex -o test.tex test.md
$ cat test
.tex
Testing environment

\begin{equation}
    i
^2=-1
\end{equation}

for whitespace.
$ pandoc
--version
pandoc
1.19.2.4
Compiled with pandoc-types 1.17.0.5, texmath 0.9.4.2, skylighting 0.1.1.5
[...]

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8729b9a5-1aff-4d3a-a17f-06d8a63beefa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.