### Bug description

````
---
title: "missing caption causes crash"
format: html
---


```{r}
#| label: load_data
data(cars)

library(flextable)
```

Now lets try a table in our word document. This should be X.

```{r}
#| label: cars
cars |>
  dplyr::slice_head(n = 5) |>
  flextable() |>
  autofit()
```
````

Output of `quarto::quarto_render("not_allowed_missing_caption.qmd", output_format = "html")`:

```
processing file: not_allowed_missing_caption.qmd
  |..............                                                        |  20%
  ordinary text without R code

  |............................                                          |  40%
label: load_data
  |..........................................                            |  60%
  ordinary text without R code

  |........................................................              |  80%
label: cars
Quitting from lines 17-22 (not_allowed_missing_caption.qmd) 
Error in opts_current_table() : 
  if a label (cars) is defined, chunk option `tbl-cap` should also be defined.
Calls: .main ... flextable_to_rmd -> knit_to_html -> opts_current_table

Execution halted
Error in `processx::run(quarto_bin, args, echo = TRUE)`:
! System command 'quarto' failed
---
Exit status: 1
stdout & stderr: <printed>
---
```

Making the document an Rmd instead, and using `rmarkdown`, it works fine. So it's definitely something to do with `quarto`, even though we are using the `knitr` engine as it's R code.

Their are many reasons a user might not want table captions, not least because they've coded workarounds to #3600 and #3601 by [managing the referencing themselves](https://github.com/rmflight/documentNumbering), but now they can't use that approach (or even just not have captions at all if they so desire), because `quarto` is being extremely opinionated on there **having to be** captions included. And I shouldn't have to have it *unlabeled* either, because labels are useful regardless of whether they are being used for cross-referencing or not.

* R 4.2.1
* RStudio 2022.12.0-preview+348
* quarto 1.3.47
* Linux, Pop! OS 22.04 (skinned version of Ubuntu 22.04)

### 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.
cscheid
2022-12-08T16:45:55Z
rmflight
bug crossref tables
v1.4
open
error if no table caption included
https://github.com/quarto-dev/quarto-cli/issues/3603