Skip to content

Commit

Permalink
avoid <<- usage (#1809)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Dec 7, 2022
1 parent 3d5cdb0 commit 27b3281
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/lint.R
Expand Up @@ -666,9 +666,9 @@ highlight_string <- function(message, column_number = NULL, ranges = NULL) {

line <- fill_with(" ", maximum)

lapply(ranges, function(range) {
substr(line, range[1L], range[2L]) <<- fill_with("~", range[2L] - range[1L] + 1L)
})
for (range in ranges) {
substr(line, range[1L], range[2L]) <- fill_with("~", range[2L] - range[1L] + 1L)
}

substr(line, column_number, column_number + 1L) <- "^"

Expand Down

0 comments on commit 27b3281

Please sign in to comment.