Only add newline to file when needed

This commit is contained in:
Dan Jones 2024-03-09 15:38:34 -06:00
commit 5b8e4696ea
4 changed files with 82 additions and 5 deletions

View file

@ -74,7 +74,7 @@ func (e Entry) MarshalText() ([]byte, error) {
}
ch := e.getFieldMarshalChan()
buff := &bytes.Buffer{}
buff.WriteString("\n@begin ")
buff.WriteString("@begin ")
buff.WriteString(e.Date.Format(DateFormat))
buff.WriteString(" - ")
buff.WriteString(e.Title)