From 7f4db3d2a2933332117c24e324bde5f6a5c52212 Mon Sep 17 00:00:00 2001 From: Craig Gumbley Date: Mon, 18 Apr 2022 21:10:50 +0100 Subject: [PATCH] Set longer line length for md render This commit sets the line length for markdown rendering to 140 characters. It's a little bit more than the recommended of 80-100 characters, but it seems to fit the terminal well. --- internal/pkg/markdown/markdown.go | 1 + internal/pkg/writer/writer.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/pkg/markdown/markdown.go b/internal/pkg/markdown/markdown.go index eb25409..8498f8a 100644 --- a/internal/pkg/markdown/markdown.go +++ b/internal/pkg/markdown/markdown.go @@ -11,6 +11,7 @@ func Render(path string) error { r, _ := glamour.NewTermRenderer( glamour.WithAutoStyle(), glamour.WithEmoji(), + glamour.WithWordWrap(140), // TODO: make this configurable ) data, err := ioutil.ReadFile(path) diff --git a/internal/pkg/writer/writer.go b/internal/pkg/writer/writer.go index 948f1ca..057f8a9 100644 --- a/internal/pkg/writer/writer.go +++ b/internal/pkg/writer/writer.go @@ -12,7 +12,9 @@ import ( func Write(changeLog *changelog.ChangeLogProperties) error { var tmplSrc = `# Changelog -All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). {{range .Tags}} ## [{{.Tag}}](https://github.com/{{$.RepoOwner}}/{{$.RepoName}}/tree/{{.Tag}}) - ({{.Date.Format "2006-01-02"}})