Skip to content

inline markup urls contain invisible invalid characters #757

Open
@schochastics

Description

@schochastics

If a url is created as part of an alert (I assume this holds for all message types) via inline markup, there are additional "invisible" characters added to the string that make the url invalid.

library(cli)
test <- "path"
cli_alert("{.url https://example.com/{test}}")
#> → <https://example.com/path>

Image

In both cases you cannot see the invalid characters but when you click the link, it turns into https://example.com/%1B%5B3mpath%1B%5B3m in the browser.

Screenshot when clicking the link in Positron:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    reprexneeds a minimal reproducible example

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions