docs(cli): fix typo (#1294)

"tripple" should be "triple".
This commit is contained in:
Brian Donovan 2023-08-04 10:49:31 -07:00 committed by GitHub
parent e98e773186
commit ab1d64bc4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,15 +46,15 @@ impl Create {
toml.as_table_mut().fmt();
let as_string = toml.to_string();
let new_string = remove_tripple_newlines(&as_string);
let new_string = remove_triple_newlines(&as_string);
let mut file = std::fs::File::create(toml_path)?;
file.write_all(new_string.as_bytes())?;
}
// remove any tripple newlines from the readme
// remove any triple newlines from the readme
let readme_path = path.join("README.md");
let readme = std::fs::read_to_string(&readme_path)?;
let new_readme = remove_tripple_newlines(&readme);
let new_readme = remove_triple_newlines(&readme);
let mut file = std::fs::File::create(readme_path)?;
file.write_all(new_readme.as_bytes())?;
@ -64,7 +64,7 @@ impl Create {
}
}
fn remove_tripple_newlines(string: &str) -> String {
fn remove_triple_newlines(string: &str) -> String {
let mut new_string = String::new();
for char in string.chars() {
if char == '\n' && new_string.ends_with("\n\n") {