Skip to content

Commit

Permalink
Merge branch 'master' into print-html-table-inline
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone authored May 30, 2024
2 parents 2b6502e + 44603af commit 4edc49d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,17 @@ process_text <- function(text, context = "html") {
)

# Use base64 encoding to avoid issues with escaping internal double
# quotes; used in conjunction with the 'data-qmd-base64' attribute
# quotes; used in conjunction with the 'data-qmd-base64' attribute
# that is recognized by Quarto
non_na_text <- base64enc::base64encode(charToRaw(non_na_text))
non_na_text <-
vapply(
non_na_text,
FUN.VALUE = character(1L),
USE.NAMES = FALSE,
FUN = function(text) {
base64enc::base64encode(charToRaw(text))
}
)

non_na_text <- tidy_gsub(non_na_text, "^", "<div data-qmd-base64=\"")
non_na_text <- tidy_gsub(non_na_text, "$", "\">")
Expand Down

0 comments on commit 4edc49d

Please sign in to comment.