Skip to content

Commit

Permalink
Stricter regexp for .r,.R files
Browse files Browse the repository at this point in the history
Fixes #625
  • Loading branch information
hadley committed Aug 18, 2017
1 parent 08ecbbc commit 202fafa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# roxygen2 6.0.1.9000

* Stricter regular expression ensures only files ending with `.R` or `.r` are
parsed for roxygen comments (#625).

* `%` in inline code blocks in markdown is now automatically escaped
(#640).

Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ same_contents <- function(path, contents) {
}

r_files <- function(path) {
sort_c(dir(file.path(path, "R"), "[.Rr]$", full.names = TRUE))
sort_c(dir(file.path(path, "R"), "\\.[Rr]$", full.names = TRUE))
}

ignore_files <- function(rfiles, path) {
Expand Down

0 comments on commit 202fafa

Please sign in to comment.