Skip to content

Commit

Permalink
Merge pull request #431 from joebonrichie/regex-tweak
Browse files Browse the repository at this point in the history
boulder/draft/metadata: Match underscores in basic first capture group
  • Loading branch information
ikeycode authored Feb 22, 2025
2 parents 9fd209b + 5e11319 commit bc5bda3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boulder/src/draft/metadata/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use super::Source;
pub fn source(upstream: &Url) -> Option<Source> {
let filename = util::uri_file_name(upstream);

let regex = Regex::new(r"^([a-zA-Z0-9-]+)-([a-zA-Z0-9._-]+)\.(zip|tar|sh|bin\.*)").ok()?;
let regex = Regex::new(r"^([a-zA-Z0-9_-]+)-([a-zA-Z0-9._-]+)\.(zip|tar|sh|bin\.*)").ok()?;
let captures = regex.captures(filename)?;

let name = captures.get(1)?.as_str().to_owned();
Expand Down

0 comments on commit bc5bda3

Please sign in to comment.