fix
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
JMARyA 2025-01-19 00:07:52 +01:00
parent 20aeb7edac
commit 4372226a2a
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -28,7 +28,7 @@ pub fn read_dir(dir: &PathBuf) -> Vec<String> {
/// Rewrite all URLs in `input` to the format `/s/<domain>/<path..>`
fn internalize_urls(input: &str, base: &str) -> String {
let url_pattern = r#"(?:(https?://([a-zA-Z0-9.-]+))?(/[\w./-]*))"#;
let url_pattern = r#"(?<!<)(?:(https?://([a-zA-Z0-9.-]+))?(/[\w./-]*))"#;
let re = regex::Regex::new(url_pattern).unwrap();
re.replace_all(input, |caps: &regex::Captures| {