From a2b38d76fabc966ea3470e4a0d2bd9094c323bc7 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Sat, 8 Jan 2022 15:25:06 +0800 Subject: [PATCH] update --- calendar/ics.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/calendar/ics.go b/calendar/ics.go index fdd4720..83fc21b 100644 --- a/calendar/ics.go +++ b/calendar/ics.go @@ -3,6 +3,7 @@ package calendar import ( "bytes" "fmt" + "strings" "text/template" "time" @@ -60,7 +61,8 @@ func ICS(cal_id string, from time.Time, to time.Time) (string, error) { if err := tmpl.Execute(buf, cal); err != nil { return "", err } - return buf.String(), nil + + return strings.ReplaceAll(buf.String(), "\n", "\r\n"), nil } func icstime(t time.Time) string {