fix:#49 new line fix google calendar description

This commit is contained in:
Elmar Kresse
2024-10-19 16:36:43 +02:00
parent 20020e1e49
commit 84bc504734

View File

@ -111,10 +111,12 @@ func generateRoomLinksForGoogleCalendar(rooms string) string {
var description strings.Builder
roomList := functions.SeperateRoomString(rooms)
description.WriteString("Orte: \n")
for _, room := range roomList {
roomLink := functions.MapRoom(room, true)
description.WriteString("<a href=\"https://map.htwk-leipzig.de/room/" + roomLink + "\"> " + room + " </a>\n")
if !functions.OnlyWhitespace(rooms) {
description.WriteString("Orte: ")
for _, room := range roomList {
roomLink := functions.MapRoom(room, true)
description.WriteString("<a href=\"https://map.htwk-leipzig.de/room/" + roomLink + "\"> " + room + " </a> ")
}
}
return description.String()