### Bug description

A reminder for a left-behind problem mentioned in #3776. 

### Steps to reproduce

````qmd
---
title: "QED symbol test"
format:
    pdf:
        keep-tex: true
---

:::{.proof}
This is a proof.
:::
````

### Expected behavior

Should produce LaTeX code like this:
```latex
\begin{proof}
This is a proof.
\end{proof}
```
which handle the spacing of QED symbol properly.

### Actual behavior

However, Quarto actually produces this
```latex
\begin{proof}

This is a proof.

\end{proof}
```
The empty line inserted before `\end{proof}` causes the QED symbol lies in a new line, instead of the end of the last line of the proof.

[Probably helpful](https://tex.stackexchange.com/questions/51781/qed-symbol-on-the-same-page-as-proof)

### Your environment

- IDE: vscode
- OS: Windows 11

### Quarto check output

```bash
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.3.340
      Path: C:\Program Files\Quarto\bin
      CodePage: 936

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....(None)

      Unable to locate an installed version of Python 3.
      Install Python 3 from https://www.python.org/downloads/

[>] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
```
cscheid
2023-06-30T15:25:47Z
sun123zxy
bug
v1.4
open
Improper spacing of QED symbol in PDF output
https://github.com/quarto-dev/quarto-cli/issues/6077