From c1f5c3c2e48969fbe70f7c7897b5e704adf57def Mon Sep 17 00:00:00 2001 From: vedhav Date: Tue, 10 Dec 2024 10:02:47 +0530 Subject: [PATCH] fix: inconsistant id generation in different platforms --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index d29cb9b7b..0728d80a5 100644 --- a/R/utils.R +++ b/R/utils.R @@ -84,7 +84,7 @@ make_c_call <- function(choices) { sanitize_id <- function(id) { pattern_escape <- "[^0-9A-Za-z_]" - id_new <- gsub(pattern_escape, "_", id) + id_new <- gsub(pattern_escape, "_", id, perl = TRUE) hashes <- vapply(id[id != id_new], rlang::hash, character(1), USE.NAMES = FALSE) id[id != id_new] <- paste0("h", substr(hashes, 1, 4), "_", id_new[id != id_new])