Skip to content

Commit

Permalink
Oops, level up the .run treatment
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Nov 2, 2024
1 parent 5ecf351 commit 74f869a
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions R/ansi-hyperlink.R
Original file line number Diff line number Diff line change
Expand Up @@ -193,23 +193,7 @@ make_link_run <- function(txt) {
return(vcapply(text, function(code1) format_inline("{.code {code1}}")))
}

custom_fmt <- get_config_chr("hyperlink_run_url_format")
if (is.null(custom_fmt)) {
if (identical(attr(sprt, "type"), "rstudio")) {
fmt_type <- "rstudio"
} else {
fmt_type <- "standard"
}
} else {
fmt_type <- "custom"
}

fmt <- switch(
fmt_type,
custom = custom_fmt,
rstudio = "ide:run:{code}",
standard = "x-r-run:{code}"
)
fmt <- get_hyperlink_format("run")
style_hyperlink(text = text, url = glue(fmt))
}

Expand Down

0 comments on commit 74f869a

Please sign in to comment.