Skip to content

Commit

Permalink
Merge pull request #692 from MichaelChirico/patch-1
Browse files Browse the repository at this point in the history
- simplify set_arg_paths (#682).
  • Loading branch information
lorenzwalthert authored Nov 9, 2020
2 parents a2a2e2e + 5f33769 commit 4fdbfd1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/set-assert-args.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,5 @@ assert_tokens <- function(tokens) {
#' @examples
#' styler:::set_arg_paths(c("./file.R", "file.R", "../another-file.R"))
set_arg_paths <- function(path) {
starts_with_. <- substr(path, 1, 2) == "./"
path[starts_with_.] <- substring(path[starts_with_.], 3)
path
gsub("^[.]/", "", path)
}

0 comments on commit 4fdbfd1

Please sign in to comment.