Equation spacing issue with fleqn (amsmath) and frenchb (Babel)

This is a follow-up to this question.

Here is an exemple of the code I wrote to add a light gray background to important equations:

\documentclass{article}

\usepackage[fleqn]{amsmath}
% \usepackage[frenchb]{babel}

% Coloured background
\usepackage{xcolor}
\usepackage{mdframed}
\newmdenv[backgroundcolor=black!3!white,
linewidth=0pt,
innerleftmargin=0pt,
innerrightmargin=0pt,
innertopmargin=0.2\baselineskip,
innerbottommargin=0.2\baselineskip]{graybck}

\newcommand{\highlighteq}[1]{#1}
\newenvironment{highlighteqenv}{%
\noindent
\vspace{0.2\baselineskip}
\begin{graybck}
}
{\end{graybck}}

\begin{document}
He said :  you must defeat Sheng Long to stand a chance' which more or less amounted to
\begin{highlighteqenv}
$$\frac{\partial \langle \alpha K \rangle}{\partial t} + \frac{\partial \lambda}{\partial z} =0$$
\end{highlighteqenv}

\end{document}


Quite strangely, it produces a wrong spacing before the equation, as displayed on the following picture:

Removing either the fleqn option of amsmath of the loading of babel with the frenchb option solves the problem :

I would expect frencb to cause such issue with something regarding paragraph indentation but why does it interact with fleqn?

Do you have any idea to prevent this additional space from appearing while keeping these two options?

-

This shows a problem which is not related to mdframed, but appears with the french module in babel whenever you start a math environment in vertical mode together with the fleqn option; the space would be added also with the input

He said : you must defeat Sheng Long to stand a chance' which more or less amounted to

$$\frac{\partial \langle \alpha K \rangle}{\partial t} + \frac{\partial \lambda}{\partial z} =0$$


(notice the blank line)

A paragraph is started anyway, so a "solution" (which is more of a hack) is to backup manually:

\newenvironment{highlighteqenv}
{\par\vspace{0.2\baselineskip}
\begin{graybck}
\leavevmode\vspace{-\baselineskip}\ignorespaces}
{\end{graybck}}


You don't need the \noindent anyway; better, though, adding a \par.

However, I'd suggest to use the standard spacing used for math displays:

\newenvironment{highlighteqenv}
{\par\vspace{\abovedisplayskip}
\begin{graybck}
\leavevmode\vspace{-\baselineskip}\ignorespaces}
{\end{graybck}\vspace\belowdisplayskip}

-
Thanks. Good to know –  Marco Daniel Sep 17 '12 at 6:30