Currently the creation of figure environments from mermaid fenced blocks in markdown source files results in extra empty lines injected into the resulting LaTeX output file.
Example:
\begin{figure}
\centering
\includegraphics{images/foo-mermaid.png}
\caption{Foo \label{fig:foo}}
\end{figure}
This should really be:
\begin{figure}
\centering
\includegraphics{images/foo-mermaid.png}
\caption{Foo \label{fig:foo}}
\end{figure}