From 437a95bfe8f5b9e42d0f16c49e727be7128bed43 Mon Sep 17 00:00:00 2001 From: rvcas Date: Thu, 31 Aug 2023 18:00:21 -0400 Subject: [PATCH] fix: behave like rust with hyphens closes #722 closes #690 --- crates/aiken-project/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/aiken-project/src/lib.rs b/crates/aiken-project/src/lib.rs index bdab5a11..f875c976 100644 --- a/crates/aiken-project/src/lib.rs +++ b/crates/aiken-project/src/lib.rs @@ -916,7 +916,7 @@ where .to_string(); // normalise windows paths - name.replace('\\', "/") + name.replace('\\', "/").replace('-', "_") } } @@ -925,7 +925,7 @@ fn is_aiken_path(path: &Path, dir: impl AsRef) -> bool { let re = Regex::new(&format!( "^({module}{slash})*{module}\\.ak$", - module = "[a-z][_a-z0-9]*", + module = "[a-z][-_a-z0-9]*", slash = "(/|\\\\)", )) .expect("is_aiken_path() RE regex");