Skip to content

Commit 4fdbfd1

Browse files
Merge pull request #692 from MichaelChirico/patch-1
- simplify set_arg_paths (#682).
2 parents a2a2e2e + 5f33769 commit 4fdbfd1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

R/set-assert-args.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,5 @@ assert_tokens <- function(tokens) {
115115
#' @examples
116116
#' styler:::set_arg_paths(c("./file.R", "file.R", "../another-file.R"))
117117
set_arg_paths <- function(path) {
118-
starts_with_. <- substr(path, 1, 2) == "./"
119-
path[starts_with_.] <- substring(path[starts_with_.], 3)
120-
path
118+
gsub("^[.]/", "", path)
121119
}

0 commit comments

Comments
 (0)