If I pass output from {fs} into link text, the actual link still shows up in the output:
path <- fs::path("a/b")
# with fs_path object
cli::cli_text("go to {.href [c](file://{path})}")
#> go to a/bc
#
# with character
cli::cli_text("go to {.href [c](file://{unclass(path)})}")
#> go to c
FWIW, this is what the output of reprex looks like:
path <- fs::path("a/b")
# with fs_path object
cli::cli_text("go to {.href [c](file://{path})}")
#> go to c (<file://'a/b'>)
cli::cli_text("go to {.href [c](file://{unclass(path)})}")
#
# with character
#> go to c (<file://a/b>)
If I pass output from {fs} into link text, the actual link still shows up in the output:
FWIW, this is what the output of reprex looks like:
Created on 2024-08-09 with reprex v2.1.1