diff --git a/src/project_file_builder.rs b/src/project_file_builder.rs index 712f8fb..2c74c93 100644 --- a/src/project_file_builder.rs +++ b/src/project_file_builder.rs @@ -14,7 +14,7 @@ pub struct ProjectFileBuilder<'a> { lazy_static! { static ref TEAM_REGEX: Regex = - Regex::new(r#"^(?:#|//||%>)?$"#).expect("error compiling regular expression"); + Regex::new(r#"^(?:#|//||%>)?$"#).expect("error compiling regular expression"); } impl<'a> ProjectFileBuilder<'a> { @@ -99,6 +99,12 @@ mod tests { map.insert("", "Blast"); map.insert("", "Blast Off"); + // New team: format (without @ symbol) + map.insert("# team: MyTeam", "MyTeam"); + map.insert("// team: MyTeam", "MyTeam"); + map.insert("", "MyTeam"); + map.insert("<%# team: MyTeam %>", "MyTeam"); + for (key, value) in map { let owner = TEAM_REGEX.captures(key).and_then(|cap| cap.get(1)).map(|m| m.as_str()); assert_eq!(owner, Some(value));