~psic4t/qcal

101a6f36ff60191f4df00939cc3f6b05f41a075e — psic4t 2 months ago 25fece6
fix spaces in appointment description
2 files changed, 16 insertions(+), 1 deletions(-)

M TODO
M parse.go
M TODO => TODO +1 -0
@@ 2,3 2,4 @@

* support UNTIL in appointments
* display ics for past appointments
* support participants in detail view

M parse.go => parse.go +15 -1
@@ 153,7 153,7 @@ func parseEventDescription(eventData *string) string {

	resultA := re.FindAllString(*eventData, -1)
	result := strings.Join(resultA, ", ")
	result = strings.Replace(result, "\n", "", -1)
	result = strings.Replace(result, "\n ", "", -1)

	result = strings.Replace(result, "\\N", "\n", -1)
	//better := strings.Replace(re.FindString(result), "\n ", "", -1)


@@ 171,6 171,19 @@ func parseEventLocation(eventData *string) string {
	return trimField(result, "LOCATION:")
}

func parseEventAttendees(eventData *string) {
	re, _ := regexp.Compile(`ATTENDEE:.*?\n`)
	attendees := re.FindAllString(*eventData, -1)

	for i := range attendees {
		//fmt.Println(eventData)
		fmt.Println(i)
		fmt.Println(attendees[i])
	}

	//	return trimField(result, "ATTENDEE:")
}

func parseEventRRule(eventData *string) string {
	re, _ := regexp.Compile(`RRULE:.*?\n`)
	result := re.FindString(*eventData)


@@ 204,6 217,7 @@ func parseMain(eventData *string, elementsP *[]Event, href, color string) {
	eventEnd, tzId := parseEventEnd(eventData)
	eventDuration := parseEventDuration(eventData)
	freq := parseEventFreq(eventData)
	parseEventAttendees(eventData)

	if eventEnd.Before(eventStart) {
		eventEnd = eventStart.Add(eventDuration)