Skip to content

Commit fb2e233

Browse files
committed
fix: String additional empty line from generated README.md
1 parent 7717a24 commit fb2e233

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/document/generate.go

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"path/filepath"
77
"regexp"
8+
"strings"
89

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

7879
re = regexp.MustCompile(`\n{3,}`)
7980
outputString = re.ReplaceAllString(outputString, "\n\n")
81+
outputString = strings.TrimSuffix(outputString, "\n")
8082

8183
output.Reset()
8284
output.WriteString(outputString)

0 commit comments

Comments
 (0)