Skip to content

Commit

Permalink
Handle url arg for rstudioapi::showDialog() (#271)
Browse files Browse the repository at this point in the history
* Handle `url` arg for `rstudioapi::showDialog()`

* Bump ark version

* Avoid leaving an extra <br> in the `message`

* Bump ark to 0.1.69
  • Loading branch information
juliasilge authored Mar 21, 2024
1 parent 0303dcd commit 216232d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/ark/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark"
version = "0.1.68"
version = "0.1.69"
edition = "2021"
rust-version = "1.75.0"
description = """
Expand Down
5 changes: 4 additions & 1 deletion crates/ark/src/modules/rstudio/dialogs.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#' @export
.rs.api.showDialog <- function(title, message, url = "") {
stopifnot(url == "")
if (!identical(url, "")) {
url <- sprintf('<a href="%s">%s</a>', url, url)
message <- sprintf('%s<br>%s', message, url)
}
.ps.ui.showDialog(title, message)
}

Expand Down

0 comments on commit 216232d

Please sign in to comment.