### Bug description

When I use `echo: fenced` block option and have multiple tables in the block, the second table loses the sub-caption and the bold formatting of the header row. With `echo: true` everything is fine. 

Here is a minimal example

```` md
---
title: results
format: html
---
 
```{r}
#| echo: fenced
#| label: tbl-fenced
#| tbl-cap: "Two tables"
#| tbl-subcap: 
#|   - tab1
#|   - tab2

gt::gt(head(mtcars))
gt::gt(head(mtcars))
```

````

quarto --version  1.2.198
Ubuntu 18.04.6 LTS
RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for Ubuntu Bionic


### 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-10-09T18:38:52Z
richardjtelford
bug lint ast
v1.4
open
formatting problems with multiple tables and echo: fenced
https://github.com/quarto-dev/quarto-cli/issues/2769