From aaa23adc8f9e3cb45d06896d284d1ce7a3dcec40 Mon Sep 17 00:00:00 2001 From: atusy <30277794+atusy@users.noreply.github.com> Date: Sun, 31 Mar 2024 07:05:02 +0900 Subject: [PATCH] fix(colformat_md): follow internal change of flextable data structure --- R/colformat.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/colformat.R b/R/colformat.R index fd6a6e9..05040b9 100644 --- a/R/colformat.R +++ b/R/colformat.R @@ -51,7 +51,12 @@ colformat_md <- function(x, } dataset <- x[[part]]$dataset - content <- x[[part]][["content"]][["content"]][["data"]] + content <- if (is.null(x[[part]][["content"]][["content"]])) { + # flextable >= 0.9.5 + x[[part]][["content"]][["data"]] + } else { + x[[part]][["content"]][["content"]][["data"]] + } nm <- colnames(content) col <- tidyselect::eval_select(rlang::expr(c(!!.j)), dataset[nm])