Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 18, 2024
1 parent 2c9032c commit 732f909
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,15 @@
# no double white space
insight::trim_ws(msg)
}


.fuzzy_grep <- function (x, pattern, precision = NULL) {

Check warning on line 295 in R/utils.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/utils.R,line=295,col=24,[function_left_parentheses_linter] Remove spaces before the left parenthesis in a function definition.
if (is.null(precision)) {
precision <- round(nchar(pattern) / 3)
}
if (precision > nchar(pattern)) {
return(NULL)
}
p <- sprintf("(%s){~%i}", pattern, precision)
grep(pattern = p, x = x, ignore.case = FALSE)
}

0 comments on commit 732f909

Please sign in to comment.