quarto-dev / quarto-dev/quarto-cli
[knitr] Cell should not allow two caption attributes
Open
@cderv is already working on this.
Since Jun 10, 2024.
bug
engines-knitr
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
When setting fig.cap in global knitr::opts_chunk every table gets appended the value set globally to fig.cap
---
title: "Test"
date: "`r Sys.Date()`"
format: pdf
editor_options:
chunk_output_type: console
---
```{r}
knitr::opts_chunk$set(fig.cap = '123')
```
```{r}
tbl_data <- tibble::tibble(a = letters[1:5], b = LETTERS[1:5])
```
```{r}
#| tbl-cap: 'Test GT'
#| tbl-label: test_gt
tbl_data |> gt::gt()
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.