This is a working quarto exmple:
---
title: "test"
format: revealjs
---
## Quarto example
```{r}
#| label: fig-plot_mtcars
#| fig-cap: nrow(mtcars).
plot(mtcars$mpg, mtcars$disp)
```
output:
How can I add a inline code to fig.cap::
desired output:

I have tried with #| fig-cap: paste("bla", nrow(mtcars))
>Solution :
You’ll need to tell the quarto YAML that you’re parsing an R expression to be evaluated. I.e.:
#| fig-cap: !expr nrow(mtcars)
For reference, see:
https://quarto.org/docs/computations/r.html#chunk-options
