From 73a166538e3fc75c89f0690d68b16655f784bd39 Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Tue, 2 May 2023 12:41:18 -0300 Subject: [PATCH] fix: missing newline when applying Fixes https://github.com/Misterio77/flavours/issues/78 --- CHANGELOG.md | 7 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/operations/apply.rs | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df580fb..ce66635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.7.1](https://github.com/Misterio77/flavours/releases/tag/v0.7.1) + +### Fixes + +- Add missing newline when applying ([#78](https://github.com/misterio77/issues/78)) +- Set minimum supported rust version ([#44](https://github.com/misterio77/issues/44)) + ## [0.7.0](https://github.com/Misterio77/flavours/releases/tag/v0.7.0) ### Additions diff --git a/Cargo.lock b/Cargo.lock index e503e76..fb18721 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,7 +287,7 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "flavours" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "base16_color_scheme", diff --git a/Cargo.toml b/Cargo.toml index d282d01..5744cc0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flavours" description = "An easy to use base16 scheme manager/builder that integrates with any workflow." -version = "0.7.0" +version = "0.7.1" authors = ["Gabriel Fontes (Misterio77) "] edition = "2018" readme = "README.md" diff --git a/src/operations/apply.rs b/src/operations/apply.rs index ecd65b5..d93606b 100644 --- a/src/operations/apply.rs +++ b/src/operations/apply.rs @@ -78,7 +78,7 @@ fn replace_delimiter( for line in file_content.lines() { if found_start && !found_end { if !appended { - changed_content.push_str(built_template); + changed_content.push_str(&format!("{}\n", built_template)); appended = true; } if line.trim().to_lowercase().eq(&end) {