yihui / knitr

A general-purpose tool for dynamic report generation in R
https://yihui.org/knitr/
2.36k stars 873 forks source link

kable throws error with HTML caption in R 4.3 #2311

Closed LeeMendelowitz closed 6 months ago

LeeMendelowitz commented 6 months ago

Here's an example of a knitr::kable call that runs with a warning in R 4.2 and earlier, but fails in R 4.3:

knitr::kable(mtcars, caption = htmltools::tags$span('Test Caption', style='color: blue;'), format='html')
Error in !is.null(caption) && !is.na(caption) :
  'length = 3' in coercion to 'logical(1)'
> xfun::session_info('knitr')
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.7.1

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  evaluate_0.23   graphics_4.3.2  grDevices_4.3.2 highr_0.10
  knitr_1.45.8    methods_4.3.2   stats_4.3.2     tools_4.3.2
  utils_4.3.2     xfun_0.41       yaml_2.3.7

By filing an issue to this repo, I promise that

I understand that my issue may be closed if I don't fulfill my promises.

github-actions[bot] commented 3 weeks ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.