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/NEWS.md b/NEWS.md index 4ae5074..a65ff3c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# ftExtra 0.6.2 + +* Require **flextable**>=0.9.5 to fix broken `colformat_md` (#101) + # ftExtra 0.6.1 * Deprecated functions masking the corresponding ones from the **flextable** package (#95) diff --git a/R/colformat.R b/R/colformat.R index fd6a6e9..0ca5d0c 100644 --- a/R/colformat.R +++ b/R/colformat.R @@ -51,7 +51,7 @@ colformat_md <- function(x, } dataset <- x[[part]]$dataset - content <- x[[part]][["content"]][["content"]][["data"]] + content <- x[[part]][["content"]][["data"]] nm <- colnames(content) col <- tidyselect::eval_select(rlang::expr(c(!!.j)), dataset[nm]) @@ -63,7 +63,7 @@ colformat_md <- function(x, # Must evaluate outside add_footnotes due to lazy evaluation of arguments ft <- flextable::compose(x, - i = seq(nrow(dataset)), j = col, part = part, + i = seq_len(nrow(dataset)), j = col, part = part, value = as_paragraph_md( texts, auto_color_link = auto_color_link, diff --git a/docs/articles/format_columns.html b/docs/articles/format_columns.html index 83bf4e6..32392fd 100644 --- a/docs/articles/format_columns.html +++ b/docs/articles/format_columns.html @@ -135,12 +135,12 @@