1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 22:41:52 +02:00

(v1.4.0.9009) bugfix for older R version

This commit is contained in:
2020-10-26 15:53:31 +01:00
parent 760d69a3e0
commit 3d096d96c2
14 changed files with 53 additions and 47 deletions

View File

@ -271,8 +271,12 @@ import_fn <- function(name, pkg, error_on_fail = TRUE) {
# - ignores formatted text while wrapping
# - adds indentation dependent on the type of message (like NOTE)
# - add additional formatting functions like blue or bold text
message_ <- function(..., appendLF = TRUE, add_fn = list(font_blue)) {
message_ <- function(..., appendLF = TRUE, add_fn = list(font_blue), as_note = TRUE) {
msg <- paste0(c(...), collapse = "")
if (isTRUE(as_note)) {
msg <- paste0("NOTE: ", gsub("note:? ?", "", msg, ignore.case = TRUE))
}
# we need to correct for already applied style, that adds text like "\033[31m\"
msg_stripped <- font_stripstyle(msg)