Skip to content

Commit 7a1258d

Browse files
authored
Add more inline markup (#1607)
1 parent 5b7110d commit 7a1258d

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

R/object-r6.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extract_r6_methods <- function(x) {
5151
c(
5252
"R6 class {.cls {name}} lacks source references.",
5353
i = paste0(
54-
"If you are using the `installed` load method in `DESCRIPTION`, then ",
54+
"If you are using the `installed` load method in {.file DESCRIPTION}, then ",
5555
"try re-installing the package with option '--with-keep.source', e.g. ",
5656
"{.code install.packages(..., INSTALL_OPTS = \"--with-keep.source\")}."
5757
)

R/roxygenize-setup.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ roxygen_setup <- function(path = ".",
99

1010
is_first <- first_time(path)
1111
if (is_first) {
12-
cli::cli_inform("First time using roxygen2. Upgrading automatically...")
12+
cli::cli_inform("First time using {.pkg roxygen2}. Upgrading automatically...")
1313
}
1414

1515
update_roxygen_version(path, cur_version = cur_version)
1616

1717
encoding <- desc::desc_get("Encoding", path)[[1]]
1818
if (!identical(encoding, "UTF-8")) {
1919
cli::cli_inform(c(
20-
x = "roxygen2 requires {.val Encoding: UTF-8}",
20+
x = "{.pkg roxygen2} requires {.val Encoding: UTF-8}",
2121
i = "Current encoding is {.val {encoding}}"
2222
))
2323
}
@@ -49,21 +49,21 @@ update_roxygen_version <- function(path, cur_version = NULL) {
4949

5050
if (!is.na(cur) && !is.na(prev) && package_version(cur) < package_version(prev)) {
5151
cli::cli_inform(c(
52-
x = "Installed roxygen2 is older than the version used with this package",
53-
i = "You have {.str {cur}} but you need {.str {prev}}"
52+
x = "Installed {.pkg roxygen2} is older than the version used with this package",
53+
i = "You have {.val {cur}} but you need {.val {prev}}"
5454
))
5555
} else if (!identical(cur, prev)) {
5656
if (!is.na(prev) && numeric_version(prev) <= "6.1.99") {
5757
cli::cli_rule()
5858
cli::cli_inform(c(
59-
"Changes in roxygen2 7.0.0:",
59+
"Changes in {.pkg roxygen2} 7.0.0:",
6060
"* `%` is now escaped automatically in Markdown mode.",
6161
"Please carefully check .Rd files for changes"
6262
))
6363
cli::cli_rule()
6464
}
6565

66-
cli::cli_inform("Setting {.var RoxygenNote} to {.str {cur}}")
66+
cli::cli_inform(c(i = "Setting {.field RoxygenNote} to {.val {cur}}"))
6767
desc::desc_set(RoxygenNote = cur, file = path)
6868
}
6969
}

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ write_if_different <- function(path, contents, command = NULL, check = TRUE) {
7070
if (check && !made_by_roxygen(path)) {
7171
cli::cli_inform(c(
7272
x = "Skipping {.path {name}}",
73-
i = "It already exists and was not generated by roxygen2."
73+
i = "It already exists and was not generated by {.pkg roxygen2}."
7474
))
7575
return(FALSE)
7676
}

tests/testthat/_snaps/object-r6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
i With name: meth1.
99
Caused by error:
1010
! R6 class <foo> lacks source references.
11-
i If you are using the `installed` load method in `DESCRIPTION`, then try re-installing the package with option '--with-keep.source', e.g. `install.packages(..., INSTALL_OPTS = "--with-keep.source")`.
11+
i If you are using the `installed` load method in 'DESCRIPTION', then try re-installing the package with option '--with-keep.source', e.g. `install.packages(..., INSTALL_OPTS = "--with-keep.source")`.
1212

tests/testthat/_snaps/roxygenize-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
roxygen_setup(path, cur_version = "8.0.0")
1313
Message
1414
First time using roxygen2. Upgrading automatically...
15-
Setting `RoxygenNote` to "8.0.0"
15+
i Setting RoxygenNote to "8.0.0"
1616
Output
1717
[1] TRUE
1818

@@ -46,7 +46,7 @@
4646
* `%` is now escaped automatically in Markdown mode.
4747
Please carefully check .Rd files for changes
4848
--------------------------------------------------------------------------------
49-
Setting `RoxygenNote` to "8.0.0"
49+
i Setting RoxygenNote to "8.0.0"
5050
Output
5151
[1] FALSE
5252

0 commit comments

Comments
 (0)