Skip to content

Commit

Permalink
fix: String additional empty line from generated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jlec committed Apr 3, 2023
1 parent 7717a24 commit fb2e233
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/document/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"path/filepath"
"regexp"
"strings"

"github.com/norwoodj/helm-docs/pkg/helm"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -77,6 +78,7 @@ func applyMarkDownFormat(output bytes.Buffer) bytes.Buffer {

re = regexp.MustCompile(`\n{3,}`)
outputString = re.ReplaceAllString(outputString, "\n\n")
outputString = strings.TrimSuffix(outputString, "\n")

output.Reset()
output.WriteString(outputString)
Expand Down

0 comments on commit fb2e233

Please sign in to comment.