### Bug description


Using `fig-align` within a chunk breaks dynamically generated tabsets (`results: asis`).
I left the `knitr: opts_chunk: fig.align:center` in the example because that's what I was originally using which generated this issue.

This might be the same issue with #1456 where the `html` has the `data-layout="center"` divs, but I don't see alignment being set.

````qmd
---
format: html
# knitr:
#   opts_chunk:
#     fig.align: center
---


## tabset (ok)

::: {.panel-tabset}

### a

```{r}
plot(1:10)
```

### b

```{r}
plot(10:1)
```

:::

## tabset fig-align (ok)

::: {.panel-tabset}

### a

```{r}
#| fig-align: center
plot(1:10)
```

### b

```{r}
#| fig-align: center
plot(10:1)
```

:::


## tabset asis (ok)

::: {.panel-tabset}

```{r}
#| results: asis

writeLines("### a")
plot(1:10)
writeLines("\n")

writeLines("### b")
plot(10:1)
writeLines("\n")
```

:::

## tabset asis fig-align (not ok)

::: {.panel-tabset}

```{r}
#| results: asis
#| fig-align: center

writeLines("### a")
plot(1:10)
writeLines("\n")

writeLines("### b")
plot(10:1)
writeLines("\n")
```

:::

````

<details>
<summary>Image</summary>

![image](https://user-images.githubusercontent.com/38573843/194909701-b3cc1c20-bb18-4c8b-b103-bf9007d2f5cb.png)

</details>

<details>
<summary>Session information</summary>

``` r
quarto::quarto_version()
#> [1] '1.1.251'
devtools::session_info(info = "platform")
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.2.1 (2022-06-23 ucrt)
#>  os       Windows 10 x64 (build 19044)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language (EN)
#>  collate  English_United States.utf8
#>  ctype    English_United States.utf8
#>  tz       America/New_York
#>  date     2022-10-10
#>  pandoc   2.19.2 @ C:/Program Files/RStudio/bin/quarto/bin/tools/ (via rmarkdown)
#> 
#> ──────────────────────────────────────────────────────────────────────────────
rstudioapi::versionInfo()
#> $citation
#> 
#> To cite RStudio in publications use:
#>   
#>   RStudio Team (2022). RStudio: Integrated Development Environment for R. RStudio, PBC, Boston, MA URL http://www.rstudio.com/.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#> @Manual{,
#>   title = {RStudio: Integrated Development Environment for R},
#>   author = {{RStudio Team}},
#>   organization = {RStudio, PBC},
#>   address = {Boston, MA},
#>   year = {2022},
#>   url = {http://www.rstudio.com/},
#> }
#> 
#> 
#> $mode
#> [1] "desktop"
#> 
#> $version
#> [1] ‘2022.7.2.576’
#> 
#> $long_version
#> [1] "2022.07.2+576"
#> 
#> $release_name
#> [1] "Spotted Wakerobin"
```

</details>

### 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-10T16:19:23Z
jmbarbone
bug wontfix
v1.3
closed
`fig-align` and `results: asis` break tabsets
https://github.com/quarto-dev/quarto-cli/issues/2784