From e17c41b641213f44b85fe5f6a4be3d6a79d81ef2 Mon Sep 17 00:00:00 2001 From: Thierry Onkelinx Date: Fri, 24 Nov 2023 14:33:27 +0100 Subject: [PATCH] fix checklist issues --- DESCRIPTION | 2 ++ R/gitbook.R | 4 ++-- R/pdf_report.R | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3e81f8a7..c89b1d6f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,6 +17,8 @@ License: GPL-3 URL: https://inbo.github.io/INBOmd/, https://github.com/inbo/inbomd, https://doi.org/10.5281/zenodo.842223 BugReports: https://github.com/inbo/inbomd/issues +Depends: + R (>= 3.5.0) Imports: assertthat, bookdown (>= 0.23.4), diff --git a/R/gitbook.R b/R/gitbook.R index a6af9a26..be3f39d2 100644 --- a/R/gitbook.R +++ b/R/gitbook.R @@ -127,7 +127,7 @@ gitbook <- function(code_folding = c("none", "show", "hide")) { template = template, extra_dependencies = list(inbomd_dep), code_folding = code_folding ) - old_post <- config$post_processor # in case a post processor have been defined + op <- config$post_processor # in case a post processor have been defined config$post_processor <- function(metadata, input, output, clean, verbose) { file(output, encoding = "UTF-8") |> readLines() -> x @@ -136,7 +136,7 @@ gitbook <- function(code_folding = c("none", "show", "hide")) { x <- c(head(x, i - 1), "", tail(x, -i + 1)) } writeLines(x, output) - old_post(metadata, input, output, clean, verbose) + op(metadata, input, output, clean, verbose) } config$clean_supporting <- TRUE return(config) diff --git a/R/pdf_report.R b/R/pdf_report.R index 2555eac7..9b6304a5 100644 --- a/R/pdf_report.R +++ b/R/pdf_report.R @@ -106,7 +106,7 @@ pdf_report <- function( args <- args[args != ""] validate_doi(ifelse(has_name(fm, "doi"), fm$doi, "1.1/1")) if ( - !has_name(fm, "doi") && has_name(fm, "public_report") && !fm$public_report + has_name(fm, "public_report") && !fm$public_report ) { Sys.time() |> format("%Y-%m-%d %H:%M:%S") |>