You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tables with markdown or html have to have escape = FALSE to not show the markdown or html verbatim when displaying in a table with kable().
If you you display the table with knitr::kable(), both types of links display correctly as links
If you use kableExtra::kable(), the markdown version just shows the markdown verbatim
However, if you unclass() the result of the kableExtra version, it does display markdown links correctly
The reprex below shows these problems in a .qmd file, but not if knit in an .Rmd file
Reprex of the problem:
---
title: "kableExtra Escape Reprex"
format: html
---
Create table with markdown and html links:
```{r}
tbl <- data.frame(
markdown = "[github](https://github.com)",
html = "<a href='https://github.com'>github</a>"
)
```
Both work with knitr::kable()
```{r, results='asis'}
knitr::kable(tbl, escape = FALSE)
```
The markdown version doesn't work with kableExtra::kable()
```{r, results='asis'}
kableExtra::kable(tbl, escape = FALSE)
```
But if you unclass() and cat() the result, it does work:
```{r, results='asis'}
kableExtra::kable(tbl, escape = FALSE) |>
unclass() |> cat()
```
quarto check Output
FYI: for RStudio users who aren't familiar with the command line, you might want to instruct them to paste the output of quarto::quarto_path() |> paste("check") |> system().
[✓] Checking Quarto installation......OK
Version: 1.0.36
Path: /Applications/RStudio.app/Contents/MacOS/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.7.3
Path: /Applications/Xcode.app/Contents/Developer/usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.2.0
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.2/Resources/library
rmarkdown: 2.14
[✓] Checking Knitr engine render......OK
I'm running RStudio 2022.07.1 Build 554
"Spotted Wakerobin" Release (7872775e, 2022-07-22) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36
quarto tools check Output
[✓] Inspecting tools
Tool Status Installed Latest
chromium Not installed --- 869685
tinytex External Installation --- v2022.08
included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
documented the quarto version you're running, by pasting the output from running quarto check in the "Quarto Check Output" text area?
documented the version of the quarto tools you're running, by providing the output from running quarto tools check in the "Quarto Tools Check Output" text area?
documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
documented which operating system you're running? If on Linux, please provide the specific distribution as well.
upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
The text was updated successfully, but these errors were encountered:
Bug description
Tables with markdown or html have to have
escape = FALSE
to not show the markdown or html verbatim when displaying in a table with kable().knitr::kable()
, both types of links display correctly as linkskableExtra::kable()
, the markdown version just shows the markdown verbatimunclass()
the result of the kableExtra version, it does display markdown links correctlyReprex of the problem:
quarto check
OutputFYI: for RStudio users who aren't familiar with the command line, you might want to instruct them to paste the output of
quarto::quarto_path() |> paste("check") |> system()
.[✓] Checking Quarto installation......OK Version: 1.0.36 Path: /Applications/RStudio.app/Contents/MacOS/quarto/bin [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.7.3 Path: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 Jupyter: (None) Jupyter is not available in this Python installation. Install with python3 -m pip install jupyter [✓] Checking R installation...........OK Version: 4.2.0 Path: /Library/Frameworks/R.framework/Resources LibPaths: - /Library/Frameworks/R.framework/Versions/4.2/Resources/library rmarkdown: 2.14 [✓] Checking Knitr engine render......OK
I'm running RStudio 2022.07.1 Build 554
"Spotted Wakerobin" Release (7872775e, 2022-07-22) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36
quarto tools check
OutputChecklist
quarto check
in the "Quarto Check Output" text area?quarto tools check
in the "Quarto Tools Check Output" text area?The text was updated successfully, but these errors were encountered: