# Blank line between equation and theorem statement

I need to end a paragraph with an equation before the statement of a theorem, but I get an unnecessary blank line. How can I remove it? Looks like the problem lies within the "thmtools" and "bookmark" packages. MWE:

\documentclass{article}

\usepackage{thmtools}
\usepackage[open]{bookmark}

\declaretheorem[numberwithin=section]{teorema}

\begin{document}
Equation:
$a^2+b^2=c^2$
\begin{teorema}
Content of the theorem.
\end{teorema}
\end{document}


The problem is with hyperref, rather than with bookmarks (and thmtools is not involved at all).

The fact that hyperref wants to set an anchor for the theorem label has the unwanted consequence that TeX thinks that the equation is followed by some text belonging to the same paragraph.

Simple solution: always leave a blank line in front of \begin{teorema}. Your code will also be cleaner and more readable.

\documentclass{article}

\usepackage{thmtools}
\usepackage[open]{bookmark}

\declaretheorem[numberwithin=section]{teorema}

\begin{document}

Equation:
$a^2+b^2=c^2$

\begin{teorema}
Content of the theorem.
\end{teorema}

\end{document}