devtools icon indicating copy to clipboard operation
devtools copied to clipboard

build_readme() matches too many files

Open brook-milligan opened this issue 3 weeks ago • 0 comments

The build_readme() function (build-readme.R) finds the file to build using the following regular expression:

  regexp <- paste0(path_file(pkg$path), "/(inst/)?readme[.]rmd")

This will match any filename that includes at least readme.rmd somewhere in the name. This includes emacs backup files (readme.rmd~) among possibly others; undoubtedly such extraneous files should be ignored. An exact match to readme.rmd can be accomplished by changing the regexp (see attached patch).

build-readme.R.patch

brook-milligan avatar Nov 30 '25 21:11 brook-milligan