summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2023-04-29 10:27:40 +0000
committerGitHub <noreply@github.com>2023-04-29 10:27:40 +0000
commit71253a2de7b4554ed1186d36a7b3194f1702b462 (patch)
treeaa0d5d3f0696be8d066bca5f7873bf663d6a59a4
parent65370eeb2c3bfd18b500ed04ce086689f5a0d700 (diff)
parent2da82c0dd210aaa4128bd68a6a6f56a820432b01 (diff)
Merge #222
222: Remove trailing whitespace r=matthiasbeyer a=TheNeikos Co-authored-by: Marcel Müller <neikos@neikos.email>
-rw-r--r--.changelogs/unreleased/2023-04-28T21_20_28_722974326.md7
-rw-r--r--src/fragment.rs2
2 files changed, 8 insertions, 1 deletions
diff --git a/.changelogs/unreleased/2023-04-28T21_20_28_722974326.md b/.changelogs/unreleased/2023-04-28T21_20_28_722974326.md
new file mode 100644
index 0000000..88eac1f
--- /dev/null
+++ b/.changelogs/unreleased/2023-04-28T21_20_28_722974326.md
@@ -0,0 +1,7 @@
++++
+subject = "Remove trailing whitespace from header in changelog files"
+type = "Bugfix"
++++
+
+Previously changelog files had an extra whitespace before the lower separator.
+This has now been removed.
diff --git a/src/fragment.rs b/src/fragment.rs
index 9552ef3..c4121bd 100644
--- a/src/fragment.rs
+++ b/src/fragment.rs
@@ -65,7 +65,7 @@ impl Fragment {
pub fn write_to<W: Write>(&self, writer: &mut W, format: Format) -> Result<(), FragmentError> {
let (seperator, header) = match format {
Format::Toml => {
- let header = toml::to_string(&self.header)?;
+ let header = toml::to_string(&self.header)?.trim_end().to_string();
("+++", header)
}
};