Skip to content

Add style_hyperlink_run()? #499

Closed as not planned
Closed as not planned

Description

@lionel-

We're using this helper to create clickable links to run code:

r-lib/pkgload@8557ca0#diff-60bef5af43a1bd541299ce9bceeb226afb23deaa5e637b145c85e05ffd552b0cR192-R199

style_hyperlink_run <- function(code) {
  if (nzchar(Sys.getenv("R_CLI_HAS_HYPERLINK_RUN"))) {
    link <- paste0("rstudio:run:", code)
    code <- cli::style_hyperlink(code, link)
  }

  cli::format_inline("{.code {code}}")
}

cc @romainfrancois

Activity

  1. hadley commented on Aug 12, 2022

    @hadley
    Member

    Duplicate of #456?

  2. lionel- commented on Aug 15, 2022

    @lionel-
    MemberAuthor

    Closing as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions