debug upload events

This commit is contained in:
yggverse 2026-03-30 13:06:44 +03:00
parent bc5dbd61f1
commit 5fdd841f3c

View file

@ -268,7 +268,9 @@ fn pre_format(data: &str, uploads: &mut HashSet<PathBuf>) -> String {
html_escape::decode_html_entities(&strip_tags::strip_tags(
&Regex::new(R).unwrap().replace_all(data, |c: &Captures| {
let rel = c[2].trim_start_matches("/").trim_start_matches("d/");
uploads.insert(rel.into());
if uploads.insert(rel.into()) {
debug!("Register upload: `{rel}`")
}
format!(
"![{}]({rel})",
c.get(1).map(|s| s.as_str()).unwrap_or_default()