diff --git a/R/style-guides.R b/R/style-guides.R index 7ab85ad9a..06dc0d940 100644 --- a/R/style-guides.R +++ b/R/style-guides.R @@ -72,7 +72,6 @@ tidyverse_style <- function(scope = "tokens", indent_without_paren = partial(indent_without_paren, indent_by = indent_by ), - fix_quotes, remove_space_before_closing_paren, remove_space_before_opening_paren = if (strict) remove_space_before_opening_paren, add_space_after_for_if_while, @@ -146,6 +145,7 @@ tidyverse_style <- function(scope = "tokens", token_manipulators <- if (scope >= "tokens") { lst( + fix_quotes, force_assignment_op, resolve_semicolon, add_brackets_in_pipe, diff --git a/R/ui.R b/R/ui.R index 96ad3425a..dddec1a4e 100644 --- a/R/ui.R +++ b/R/ui.R @@ -175,7 +175,10 @@ prettify_any <- function(transformers, filetype, recursive, exclude_files) { #' Style `.R` and/or `.Rmd` files #' #' Performs various substitutions in the files specified. -#' Carefully examine the results after running this function! +#' Carefully examine the results after running this function! +#' @section Encoding: +#' UTF-8 encoding is assumed. Please convert your code to UTF-8 if necessary +#' before applying styler. #' @param path A character vector with paths to files to style. #' @inheritParams style_pkg #' @inheritSection transform_files Value diff --git a/man/style_file.Rd b/man/style_file.Rd index 78d452121..53d18bd62 100644 --- a/man/style_file.Rd +++ b/man/style_file.Rd @@ -24,6 +24,12 @@ conveniently constructed via the \code{style} argument and \code{...}. See Performs various substitutions in the files specified. Carefully examine the results after running this function! } +\section{Encoding}{ + +UTF-8 encoding is assumed. Please convert your code to UTF-8 if necessary +before applying styler. +} + \section{Value}{ Invisibly returns a data frame that indicates for each file considered for