Skip to content

Commit 71e36f5

Browse files
Merge pull request #290 from lorenzwalthert/master
- Adapt documentation (#290).
2 parents 5979267 + b641002 commit 71e36f5

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

R/addins.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#' @seealso [Sys.setenv()]
1717
NULL
1818

19-
#' @describeIn styler_addins Styles the active file
19+
#' @describeIn styler_addins Styles the active file with [tidyverse_style()] and
20+
#' `strict = TRUE`.
2021
style_active_file <- function() {
2122
transformer <- make_transformer(tidyverse_style())
2223
context <- get_rstudio_context()
@@ -53,7 +54,8 @@ try_transform_as_r_file <- function(context, transformer) {
5354
))
5455
}
5556

56-
#' @describeIn styler_addins Styles the highlighted region
57+
#' @describeIn styler_addins Styles the highlighted selection in a `.R` or
58+
#' `.Rmd` file.
5759
style_selection <- function() {
5860
context <- get_rstudio_context()
5961
text <- context$selection[[1]]$text

R/ui.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ prettify_any <- function(transformers, recursive, exclude_files) {
121121

122122
}
123123

124-
#' Style a file
124+
#' Style `.R` and/or `.Rmd` files
125125
#'
126-
#' Performs various substitutions in the `.R` file specified.
126+
#' Performs various substitutions in the files specified.
127127
#' Carefully examine the results after running this function!
128128
#' @param path A character vector with paths to files to style.
129129
#' @inheritParams style_pkg

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ style_text(ugly_code)
5151

5252
There are a few variants of `style_text()`:
5353

54-
* `style_file()` styles a single .R file.
54+
* `style_file()` styles .R and/or .Rmd files.
5555
* `style_dir()` styles all .R files in a directory.
5656
* `style_pkg()` styles the source files of an R package.
5757
* RStudio Addins for styling the active file, styling the current package and

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ style_text(ugly_code)
2626

2727
There are a few variants of `style_text()`:
2828

29-
- `style_file()` styles a single .R file.
29+
- `style_file()` styles .R and/or .Rmd files.
3030
- `style_dir()` styles all .R files in a directory.
3131
- `style_pkg()` styles the source files of an R package.
3232
- RStudio Addins for styling the active file, styling the current package and styling the highlighted code region.

man/style_file.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/styler_addins.Rd

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)