### Bug description

Figure captions over a certain length cause consistent rendering failures. Here is a minimal example:

```
---
title: "matplotlib demo"
format:
  html:
    code-fold: true
jupyter: python3
---

For a demonstration of a line plot on a polar axis, see @fig-polar.

```{python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis A line plot on a polar axis A line plot on a polar axis"

import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
  subplot_kw = {'projection': 'polar'} 
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```

Rendering using `quarto render test.qmd` gives:

```
Starting python3 kernel...Done

Executing 'test.ipynb'
  Cell 1/1...ERROR: 

None of the known patterns match for   axis

```

I believe this may also relate to https://github.com/quarto-dev/quarto-cli/issues/1194.

---

# System info

```
::  quarto check

[✓] Checking Quarto installation......OK
      Version: 0.9.619
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.5
      Path: /home/cjber/qtest/.direnv/python-3.10.5/bin/python3
      Jupyter: 4.10.0
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.2.1
      Path: /usr/lib64/R
      LibPaths:
        - /home/cjber/.r
        - /usr/lib/R/library
      rmarkdown: 2.14.3

[✓] Checking Knitr engine render......OK
```

Running Arch Linux:

```
:: uname -r
5.18.6-arch1-1
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, self-contained, and reproducible example?
- [X] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
2022-06-25T14:12:34Z
cjber
bug
closed
Long figure captions cause render failure 'None of the known patterns match for ...'
https://github.com/quarto-dev/quarto-cli/issues/1222