fix(templates): properly replace author email

This commit is contained in:
ObserverOfTime 2024-10-05 10:40:15 +03:00 committed by Amaan Qureshi
parent 95f24e0364
commit 21a34f9124

View file

@ -742,7 +742,12 @@ fn generate_file(
}
if let Some(email) = generate_opts.author_email {
replacement = replacement.replace(AUTHOR_EMAIL_PLACEHOLDER, email);
replacement = match filename {
"Cargo.toml" | "grammar.js" => {
replacement.replace(AUTHOR_EMAIL_PLACEHOLDER, &format!("<{email}>"))
}
_ => replacement.replace(AUTHOR_EMAIL_PLACEHOLDER, email),
}
} else {
match filename {
"package.json" => {