From a78d3efc61e57411c7c8c35add3c888e5b70e998 Mon Sep 17 00:00:00 2001 From: atusy <30277794+atusy@users.noreply.github.com> Date: Sun, 31 Mar 2024 13:04:26 +0900 Subject: [PATCH] fixup! fix(colformat_md): follow internal change of flextable data structure --- DESCRIPTION | 2 +- R/colformat.R | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2aa97ec..b4921ba 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -29,7 +29,7 @@ BugReports: https://github.com/atusy/ftExtra/issues Imports: dplyr (>= 1.0.0), jsonlite, - flextable (>= 0.8.3), + flextable (>= 0.9.5), tidyr, purrr (>= 1.0.0), magrittr, diff --git a/R/colformat.R b/R/colformat.R index 05040b9..63dbd4e 100644 --- a/R/colformat.R +++ b/R/colformat.R @@ -51,12 +51,7 @@ colformat_md <- function(x, } dataset <- x[[part]]$dataset - content <- if (is.null(x[[part]][["content"]][["content"]])) { - # flextable >= 0.9.5 - x[[part]][["content"]][["data"]] - } else { - x[[part]][["content"]][["content"]][["data"]] - } + content <- x[[part]][["content"]][["data"]] nm <- colnames(content) col <- tidyselect::eval_select(rlang::expr(c(!!.j)), dataset[nm])