````markdown
---
title: "Test"
format: html
keep-md: true
---

Test to add caption under a plotly graph

```{r}
#| label: fig-plotly
#| fig-cap: "My figure caption here"
#| echo: false
#| message: false

library(plotly)
fig <- plot_ly(midwest, x = ~percollege, color = ~state, type = "box")
fig
```
````

It seems we are missing some fenced div where the figure caption should have been applied 
````
---
title: "Test"
format: html
keep-md: true
---



Test to add caption under a plotly graph


::: {.cell}


```{=html}
<! --plotly html in here -->
```

:::
````

I believe this is supposed to work. 

I get the same results with `v1.2.475` oddly. So not a 1.3 regression, unless one of the patch version introduced this. 

Probably something in the knitr hooks. I'll have a look but if anyone has clues, please share

cderv
2023-03-31T14:19:30Z
cderv
bug knitr
v1.3
closed
figure caption with plotly not showing 
https://github.com/quarto-dev/quarto-cli/issues/5052