1 parent
761bd5a4d4
commit
a394735fa9
1 file changed
+6
-3
@@ -26,7 +26,10 @@ fn compute_repo_dir(url: &str) -> String {
|
||||
':' => {
|
||||
dir.push_str("sCs");
|
||||
}
|
||||
'.' | '-' | '_' => dir.push(c),
|
||||
'.' => {
|
||||
dir.push_str("sDs");
|
||||
}
|
||||
'-' | '_' => dir.push(c),
|
||||
c if c.is_alphanumeric() => dir.push(c),
|
||||
c => dir.push_str(&format!("u{}", c as u32)),
|
||||
}
|
||||
@@ -244,8 +247,8 @@ mod test {
|
||||
for (input, expect) in &[
|
||||
("foo", "foo"),
|
||||
(
|
||||
"github.com/wez/wezterm-plugins",
|
||||
"github.comsZswezsZswezterm-plugins",
|
||||
"githubsDscom/wez/wezterm-plugins",
|
||||
"githubsDscomsZswezsZswezterm-plugins",
|
||||
),
|
||||
("localhost:8080/repo", "localhostsCs8080sZsrepo"),
|
||||
] {
|
||||
|
||||
Reference in new issue
Block a user