Skip to content

Commit

Permalink
Use trimws() to replace str_trim()
Browse files Browse the repository at this point in the history
  • Loading branch information
nanxstats committed Mar 11, 2024
1 parent b9a0bcd commit 3099207
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
7 changes: 3 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ BugReports: https://github.com/nanxstats/liftr/issues
Depends:
R (>= 3.0.2)
Imports:
yaml,
knitr,
rmarkdown,
stringr,
rstudioapi
rstudioapi,
yaml
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.3.1
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export(render_docker)
importFrom(knitr,knit)
importFrom(rmarkdown,render)
importFrom(rstudioapi,getActiveDocumentContext)
importFrom(stringr,str_trim)
importFrom(utils,browseURL)
importFrom(yaml,as.yaml)
importFrom(yaml,yaml.load)
Expand Down
6 changes: 2 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ uuid = function() {
}

#' check if from Bioconductor base images
#' @importFrom stringr str_trim
#' @noRd
is_from_bioc = function(x) {
substr(str_trim(x), 1L, 13L) == 'bioconductor/'
substr(trimws(x), 1L, 13L) == 'bioconductor/'
}

#' check if from the rocker/rstudio base image
#' @importFrom stringr str_trim
#' @noRd
is_from_rstudio = function(x) {
substr(str_trim(x), 1L, 14L) == 'rocker/rstudio'
substr(trimws(x), 1L, 14L) == 'rocker/rstudio'
}

# remove consecutive blank lines and only keep one
Expand Down
2 changes: 1 addition & 1 deletion man/liftr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3099207

Please sign in to comment.