fix: trim spaces in file hashes (closes #2908) (#2913)

This commit is contained in:
mrvillage 2024-09-03 08:51:03 -04:00 committed by GitHub
parent 2b8e987cb8
commit 8fcf3544a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -56,9 +56,10 @@ pub fn HydrationScripts(
if !line.is_empty() {
if let Some((file, hash)) = line.split_once(':') {
if file == "js" {
js_file_name.push_str(&format!(".{}", hash));
js_file_name.push_str(&format!(".{}", hash.trim()));
} else if file == "wasm" {
wasm_file_name.push_str(&format!(".{}", hash));
wasm_file_name
.push_str(&format!(".{}", hash.trim()));
}
}
}

View file

@ -60,7 +60,8 @@ pub fn HashedStylesheet(
if !line.is_empty() {
if let Some((file, hash)) = line.split_once(':') {
if file == "css" {
css_file_name.push_str(&format!(".{}", hash));
css_file_name
.push_str(&format!(".{}", hash.trim()));
}
}
}