quarto-dev / quarto-dev/quarto-cli

Using paragraph in tbl-cap or fig-cap cell options do not work and nothing prevents it

Open
#7,656 5 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Nov 30, 2023.

bug crossref engines-knitr
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

---
title: "Example"
format: html
keep-md: true
---

```{r}
#| label: tbl-test
#| tbl-cap: |
#|    Big table 
#|    
#|    Really small

knitr::kable(
  mtcars[1:6, 1:3]
)
```

I don't think this should be supported - and thus nothing prevents a rendering to a broken doc

image

Intermediate Md is

---
title: "Example"
format: html
keep-md: true
---


::: {#tbl-test .cell tbl-cap='Big table

Really small'}

```{.r .cell-code}
knitr::kable(
  mtcars[1:6, 1:3]
)
```

::: {.cell-output-display}


|                  |  mpg| cyl| disp|
|:-----------------|----:|---:|----:|
|Mazda RX4         | 21.0|   6|  160|
|Mazda RX4 Wag     | 21.0|   6|  160|
|Datsun 710        | 22.8|   4|  108|
|Hornet 4 Drive    | 21.4|   6|  258|
|Hornet Sportabout | 18.7|   8|  360|
|Valiant           | 18.1|   6|  225|


:::
:::

See how the new line in YAML will break the line on the fenced div attributes, creating an unsupported syntax

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.