Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kable throws error with HTML caption in R 4.3 #2311

Closed
3 tasks done
LeeMendelowitz opened this issue Dec 11, 2023 · 1 comment · Fixed by #2312
Closed
3 tasks done

kable throws error with HTML caption in R 4.3 #2311

LeeMendelowitz opened this issue Dec 11, 2023 · 1 comment · Fixed by #2312
Assignees
Labels
bug Bugs

Comments

@LeeMendelowitz
Copy link
Contributor

LeeMendelowitz commented Dec 11, 2023

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 have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('knitr'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/knitr').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

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

LeeMendelowitz added a commit to LeeMendelowitz/knitr that referenced this issue Dec 11, 2023
@cderv cderv added the bug Bugs label Dec 11, 2023
@yihui yihui moved this to Todo In Progress in R Markdown Team Projects Dec 11, 2023
@yihui yihui closed this as completed Dec 11, 2023
@github-project-automation github-project-automation bot moved this from Todo In Progress to Done in R Markdown Team Projects Dec 11, 2023
@yihui yihui linked a pull request Dec 11, 2023 that will close this issue
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants