diff --git a/pkg/generator/changelog_generator.go b/pkg/generator/changelog_generator.go index b2772a6..86e1564 100644 --- a/pkg/generator/changelog_generator.go +++ b/pkg/generator/changelog_generator.go @@ -21,7 +21,7 @@ func formatCommit(c *semrel.Commit) string { if c.Scope != "" { ret += fmt.Sprintf("**%s:** ", c.Scope) } - ret += fmt.Sprintf("%s (%s)\n", c.Message, trimSHA(c.SHA)) + ret += fmt.Sprintf("%s (%s)", c.Message, trimSHA(c.SHA)) return ret } @@ -61,7 +61,7 @@ func (g *DefaultChangelogGenerator) Generate(changelogConfig *generator.Changelo break } if commit.Change != nil && commit.Change.Major { - bc := fmt.Sprintf("%s```\n%s\n```\n", formatCommit(commit), strings.Join(commit.Raw[1:], "\n")) + bc := fmt.Sprintf("%s\n```\n%s\n```", formatCommit(commit), strings.Join(commit.Raw[1:], "\n")) clTypes.AppendContent("%%bc%%", bc) continue } diff --git a/pkg/generator/changelog_types.go b/pkg/generator/changelog_types.go index 4ea54e7..c2828f0 100644 --- a/pkg/generator/changelog_types.go +++ b/pkg/generator/changelog_types.go @@ -18,14 +18,14 @@ func NewChangelogTypes() ChangelogTypes { func (ct *ChangelogTypes) AppendContent(cType, content string) { for i, cct := range *ct { if cct.Type == cType { - (*ct)[i].Content += content + (*ct)[i].Content += content + "\n" return } } *ct = append(*ct, ChangelogType{ Type: cType, Text: cType, - Content: content, + Content: content + "\n", }) }