diff --git a/NEWS.md b/NEWS.md index 0988b9e053..362fc2ef34 100644 --- a/NEWS.md +++ b/NEWS.md @@ -96,6 +96,8 @@ * Fixed a LaTeX bug where some characters following a `\midrule` would corrupt the table (#145, #391, #1107, #1182). (#1390) +* Provided a rendering fallback for HTML tables rendered in Quarto where the combination of `fmt_markdown()` and `tab_options(quarto.disable_processing = TRUE)` would incorrectly result in empty cells. (#1455) + * A issue associated with a lack of HTML formatting within interactive tables has been fixed (#1299, #1370, #1384, #1443). (#1388) * Many user-facing error messages have been enhanced using the latest features from the **cli** package. (#1337, thanks @olivroy!) diff --git a/R/utils.R b/R/utils.R index 32504f8cd0..c113a6a489 100644 --- a/R/utils.R +++ b/R/utils.R @@ -757,8 +757,24 @@ md_to_html <- function(x, md_engine) { non_na_x <- x[!is.na(x)] - non_na_x <- tidy_gsub(non_na_x, "^", "") + non_na_x_processed <- + vapply( + as.character(x[!is.na(x)]), + FUN.VALUE = character(1), + USE.NAMES = FALSE, + FUN = function(x) { + md_engine_fn[[1]](text = x) + } + ) + + non_na_x <- tidy_gsub(non_na_x, "^", "
") + + non_na_x <- + paste0( + non_na_x, "
", + non_na_x_processed, "
" + ) #nocov end }