Some text before the equation.
$$
x = y + z
$$
Some text after.
Here's inline display math: $$a = b$$ that should be converted to block format.
Another standalone block:
$$
\frac{a}{b} = c
$$
End of document.
This is not math:
$$
\frac{a}{b} = c
Because it is not closed properly.