### Bug description

Hello,

I am trying to have a figure in a jupyter notebook (in python) with a figure caption that can be cross-referenced in the text.

Following the documentation [here](https://quarto.org/docs/authoring/figures.html), I put the follwing

```
::: {#fig-elephant}

![](hanno.png)

Famous Elephants
:::
```

However, this leads to the following figure caption `Figure 2: ?(caption)`. It does not work neither with the following code

```
::: {#fig-elephant}

![Famous Elephants](hanno.png)


:::
```

This bug is not present when one has two subfigures, as shown in the documentation.

```
::: {#fig-elephants layout-ncol=2}

![Surus](surus.png){#fig-surus}

![Hanno](hanno.png){#fig-hanno}

Famous Elephants
:::
```

Tested on Mac Os 12.0.1.

Thanks a lot for the help!

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2022-11-30T16:20:53Z
adauphin
bug needs-repro
closed
Figure caption missing for single figure
https://github.com/quarto-dev/quarto-cli/issues/3525