fix(templates): properly replace author email
(cherry picked from commit 21a34f9124)
This commit is contained in:
parent
b3f808cc01
commit
b759a5fac5
1 changed files with 6 additions and 1 deletions
|
|
@ -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" => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue