diff --git a/R/parse.R b/R/parse.R index 2d09809ca..f9b7a601e 100644 --- a/R/parse.R +++ b/R/parse.R @@ -94,10 +94,8 @@ get_parse_data <- function(text, include_text = TRUE, ...) { # avoid https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16041 parse_safely(text, keep.source = TRUE) parsed <- parse_safely(text, keep.source = TRUE) - pd <- styler_df( - utils::getParseData(parsed, includeText = include_text), - .name_repair = "minimal" - ) + pd <- utils::getParseData(parsed, includeText = include_text) %>% + styler_df() if (getRversion() < "4.2") { is_unicode_parsing_error <- grepl("^\"\"$", pd$text) if (any(is_unicode_parsing_error)) { @@ -163,7 +161,7 @@ ensure_correct_txt <- function(pd, text) { by.y = "id", suffixes = c("", "parent") ) %>% - styler_df(.name_repair = "minimal") + styler_df() if (!lines_and_cols_match(new_text)) { abort(paste( diff --git a/R/utils.R b/R/utils.R index 28575949d..f7ff3dc91 100644 --- a/R/utils.R +++ b/R/utils.R @@ -7,8 +7,8 @@ line_col_names <- function() { #' Wrapper functions to encapsulate data frame creation #' @keywords internal #' @noRd -styler_df <- function(..., .size = NULL, .name_repair = "minimal") { - vctrs::data_frame(..., .size = .size, .name_repair = .name_repair) +styler_df <- function(...) { + vctrs::data_frame(..., .name_repair = "minimal") } #' @keywords internal