### Bug description

Good day,

RStudio Version 2023.03.0+386 (2023.03.0+386)
R version 4.2.2
MacOS Ventura 13.3.1 on a Apple M1 Max
The output of `quarto check` is included at the end.

I have set up a clean Quarto website with default settings for `_quarto.yml` etc. The problem I am experiencing concerns producing a `kableExtra` formatted table in an HTML rendered page.

Providing the table's name as `#| tbl-cap: "The table's caption"` at the start of the code chunk does not result in the intended outcome. A normal kable is produced.

However, providing the table's name as `#| fig-cap: "The table's caption"` at the start of the code chunk DOES result in the intended outcome.

Herewith a minimal reproducible example:

```
---
title: "The sparrow data"
tbl-cap-location: top
---

```{r}
#| message: false
library(tidyverse)
library(kableExtra)
```

Jerrold H. Zar's sparrow data:

```{r}
sparrows <- tibble(age = c(3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 16, 17),
                   wing = c(1.4, 1.5, 2.2, 2.4, 3.1, 3.2, 3.2, 3.9, 4.1, 4.7, 4.5, 5.2, 5.0))

```

Providing the table's name as `#| tbl-cap: "The table's caption specified in the code chunk"` at the start of the code chunk does not result in the intended outcome.

```{r}
#| tbl-cap: "The table's caption specified in the code chunk"
kbl(sparrows,
    caption = "The table's caption given to code kableExtra::kbl",
    col.names = c("Age (days)", "Wing length (mm)")) |>
  kable_classic(bootstrap_options = "striped", full_width = FALSE)
```

Providing the table's name as `#| fig-cap: "The table's caption specified in the code chunk"` at the start of the code chunk DOES result in the intended outcome.

```{r}
#| fig-cap: "The table's caption specified in the code chunk"
kbl(sparrows,
    caption = "The table's caption given to kableExtra::kbl",
    col.names = c("Age (days)", "Wing length (mm)")) |>
  kable_classic(bootstrap_options = "striped", full_width = FALSE)
```

```

Another issue is that the R installation is not found by `quarto check` when it is there (see below). I must still report this as a reparate issue.

**[✓] 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.302
      Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.13 (Conda)
      Path: /Users/ajsmit/opt/anaconda3/bin/python
      Jupyter: 4.11.1
      Kernels: python3

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

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/**

Thank you kindly,
AJ Smit

### 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.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
cscheid
2023-04-09T08:43:55Z
ajsmit
bug tables regression
v1.4
open
#| tbl-cap not working as expected with kableExtra
https://github.com/quarto-dev/quarto-cli/issues/5138