diff --git a/src/main.rs b/src/main.rs index 0e2995c..8c87d7e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -103,6 +103,7 @@ fn get_url(url: String) -> BoxFuture<'static, (String, Result[^/]+)/(?P[^/]+)/actions(?:\?workflow=.+)?").unwrap(); + static ref YOUTUBE_REGEX: Regex = Regex::new(r"https://www.youtube.com/watch\?v=(?P.+)").unwrap(); } if status == StatusCode::NOT_FOUND && ACTIONS_REGEX.is_match(&url) { let rewritten = ACTIONS_REGEX.replace_all(&url, "https://github.com/$org/$repo"); @@ -110,6 +111,15 @@ fn get_url(url: String) -> BoxFuture<'static, (String, Result