fix: Remove empty whitespace before prefix and CR

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2021-05-12 15:46:41 +02:00
parent f513a8d130
commit 25059c6abf
No known key found for this signature in database
GPG key ID: CD9628474574E0B6

View file

@ -6,6 +6,7 @@ import (
"io"
"os"
"sort"
"strings"
"code.gitea.io/sdk/gitea"
"github.com/bbrks/wrap"
@ -107,6 +108,9 @@ func BackUpSource(filepath string) {
body = " " + body
}
body = strings.Replace(body, "\r", "", -1)
body = strings.Replace(body, " ** \n", " **\n", -1)
fmt.Fprintf(outputFile, "/**%s **/\n", body)
nextComment++
}