Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link text for files does not display properly with fs_path objects #714

Open
zkamvar opened this issue Aug 9, 2024 · 0 comments
Open

link text for files does not display properly with fs_path objects #714

zkamvar opened this issue Aug 9, 2024 · 0 comments

Comments

@zkamvar
Copy link
Contributor

zkamvar commented Aug 9, 2024

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/b�c
#
# 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>)

Created on 2024-08-09 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant