Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Feb 8, 2024
1 parent 7cb2d69 commit 6d33796
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/format_tt.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ format_tt_lazy <- function(x,
assert_function(identity)
assert_string(sprintf, null.ok = TRUE)
assert_flag(markdown)
if (is.null(j)) jnull <- TRUE else jnull <- FALSE
j <- sanitize_j(j, x)

# In sanity_tt(), we fill in missing NULL `j` in the format-specific versions,
Expand Down Expand Up @@ -206,7 +207,7 @@ format_tt_lazy <- function(x,
o <- meta(x)$output
}
# if j includes all columns, the user wants to escape the full table, including the column headers
if (all(j %in% seq_len(meta(x, "ncols")))) {
if (jnull) {
colnames(x) <- escape_text(colnames(x), output = o)
}
for (col in j) {
Expand Down

0 comments on commit 6d33796

Please sign in to comment.