### Bug description

In HTML output, an inline formula within quotes, for example `some text "$a=b$" some text` may at times get a line break right after the initial quote, or right before the final quote.

### Steps to reproduce

1. Save this example document `testquotes.qmd`:
```
---
title: "Test quotes"
format:
  html:
    html-math-method: mathjax
---

test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" test "$a=b$" 
```

2. Render the document to HTML:
```
quarto render testquotes.qmd --to html
```

3. Open the rendered HTML file `testquotes.html` in a browser. **Browsers tested: Firefox 114.0.1 (64-bit), Chromium 114.0.5735.106 (Official Build) snap (64-bit)** on Ubuntu 20.04.

4. Slowly resize the browser window, enlarging or shrinking it, paying attention at where the adapted line breaks appear. You should be able to see the situation as in this screenshot; see the red ellipse:
![html_output](https://github.com/quarto-dev/quarto-cli/assets/9976691/979bb39f-2b41-457a-b5b4-b949987f2d2c)


### Expected behavior

Line breaks shouldn't occurr after opening quotes or before closing ones.

### Actual behavior

Line breaks sometimes occurr after opening quotes or before closing quotes around an inline equation.

### Your environment

- IDE: GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2022-07-28
- OS: Ubuntu 20.04 64-bit, Kernel Version: 5.14.0-1059-oem


### Quarto check output

```
[✓] 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.353
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.8.10
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.0
      Path: /usr/lib/R
      LibPaths:
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.43
      rmarkdown: 2.22

[✓] Checking Knitr engine render......OK
```
2023-06-14T12:06:08Z
pglpm
bug
open
Anomalous HTML line break for inline equations within quotes
https://github.com/quarto-dev/quarto-cli/issues/5920