Skip to content

gt::md() fails when applied to a blank string in new version v0.11.0 on Quarto #1769

Description

@ddsjoberg

Prework

Description

@remlapmot reported an issue to gtsummary after they updated to gt v0.11.0. By default, our headers in gtsummary are processed with gt::md(), and a blank string leads to an error in Quarto. There is no error when run interactively or using R Markdown. I tested in Quarto versions v1.4.549 and v1.5.54 (released a couple of days ago).

For now, I can update gtsummary to remove gt::md() when the string is blank.

Reproducible example

---
title: "tbl_cross reprex"
format:
  html:
    embed-resources: true
---

Example 

```{r}
packageVersion("gt")

mtcars[1:3, 1:2] |> 
  gt::gt() |> 
  gt::cols_label(mpg = gt::md(""))
```

Thank you!!

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions