diff --git a/R/joyn-merge.R b/R/joyn-merge.R index f25ce40..a10b4e6 100644 --- a/R/joyn-merge.R +++ b/R/joyn-merge.R @@ -562,7 +562,7 @@ joyn <- function(x, # get output method option output_method <- getOption("joyn.output_method", "plain") - if (output_method == "cli") { + if (output_method) { cli::cli_li( sprintf( "Joyn returned {.run [{.strongArg {notes_count} notes}](joyn::joyn_msg('%s'))} and raised diff --git a/R/zzz.R b/R/zzz.R index 89b6424..49d3b77 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -8,7 +8,8 @@ joyn.match_type = c("1:1", "1:m", "m:1", "m:m"), joyn.na.last = FALSE, joyn.msg_type = "basic", - joyn.output_method = if (rstudioapi::isAvailable()) "cli" else "plain" + joyn.output_method = cli::ansi_has_hyperlink_support() + ) toset <- !(names(op.joyn) %in% names(op))