mirror of
https://github.com/msberends/AMR.git
synced 2026-03-19 15:42:27 +01:00
Fix {.help} markup to use correct cli link format [{.fun fn}](AMR::fn)
Replace all instances of {.help AMR::fn}() (incorrect format with manual
parentheses outside the link) with {.help [{.fun fn}](AMR::fn)} which is
the correct cli hyperlink syntax: the display text [{.fun fn}] renders the
function name with parentheses automatically, and (AMR::fn) is the link target.
Also update the plain-text fallback handler in aa_helper_functions.R to
extract the display text from the [text](topic) markdown link format,
so that non-cli environments show just the function name (e.g. `fn()`),
not the raw link markup.
Dynamic cases in amr_selectors.R and mo_property.R also updated.
https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
This commit is contained in:
@@ -210,7 +210,7 @@ get_column_abx <- function(x,
|
||||
newnames <- suppressWarnings(as.ab(names(dots), info = FALSE))
|
||||
if (anyNA(newnames)) {
|
||||
if (isTRUE(info)) {
|
||||
message_("WARNING: some columns returned NA for {.help AMR::as.ab}()", as_note = FALSE)
|
||||
message_("WARNING: some columns returned NA for {.help [{.fun as.ab}](AMR::as.ab)}", as_note = FALSE)
|
||||
}
|
||||
warning_("Invalid antibiotic reference(s): ", vector_and(names(dots)[is.na(newnames)], quotes = FALSE),
|
||||
call = FALSE,
|
||||
@@ -267,7 +267,7 @@ get_column_abx <- function(x,
|
||||
if (all_okay == TRUE) {
|
||||
message_(" OK.", as_note = FALSE)
|
||||
} else if (!isFALSE(dups)) {
|
||||
message_("WARNING: some results from {.help AMR::as.ab}() are duplicated: ", vector_and(dups, quotes = "`"), as_note = FALSE)
|
||||
message_("WARNING: some results from {.help [{.fun as.ab}](AMR::as.ab)} are duplicated: ", vector_and(dups, quotes = "`"), as_note = FALSE)
|
||||
} else {
|
||||
message_(" WARNING.", as_note = FALSE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user