We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a740453 commit af692c8Copy full SHA for af692c8
R/snakeToCamel.R
@@ -38,7 +38,7 @@ snakeToCamel <- function(pathToFile, ask = TRUE) {
38
}
39
message(variables[[i]], " -> ", replacements[[i]])
40
if (!ask || askYesNo("replace?")) {
41
- lines <- gsub(paste0("\\b", variables[[i]], "\\b"), replacements[[i]], lines)
+ lines <- gsub(paste0('(?<!["', "'])\\b", variables[[i]], "\\b"), replacements[[i]], lines, perl = TRUE)
42
writeLines(lines, pathToFile)
43
44
0 commit comments