Skip to content

Commit 2cd3055

Browse files
committed
chore: remove dumplicate clean_separators
1 parent e32f4e7 commit 2cd3055

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

turbopack/crates/turbopack-browser/src/chunking_context.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -944,11 +944,6 @@ struct ChunkPathInfo {
944944
content_hashing: Option<ContentHashing>,
945945
}
946946

947-
pub fn clean_separators(s: &str) -> String {
948-
static SEPARATOR_REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"[/#?@]").unwrap());
949-
SEPARATOR_REGEX.replace_all(s, "").to_string()
950-
}
951-
952947
static NAME_PLACEHOLDER_REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"\[name\]").unwrap());
953948

954949
pub fn match_name_placeholder(s: &str) -> bool {

turbopack/crates/turbopack-core/src/ident.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ impl ValueToString for AssetIdent {
433433
}
434434
}
435435

436-
fn clean_separators(s: &str) -> String {
436+
pub fn clean_separators(s: &str) -> String {
437437
static SEPARATOR_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"[/#?\[\]<>@]").unwrap());
438438
SEPARATOR_REGEX.replace_all(s, "_").to_string()
439439
}

0 commit comments

Comments
 (0)