Skip to content

Commit

Permalink
Set longer line length for md render
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chelnak committed Apr 18, 2022
1 parent d2dd51c commit 7f4db3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/pkg/markdown/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion internal/pkg/writer/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}})
Expand Down

0 comments on commit 7f4db3d

Please sign in to comment.