dont put field name summary into summary field

This commit is contained in:
bjt-user 2024-01-20 21:00:18 +01:00
parent 7a5b3bc97a
commit ff20bb92f7
2 changed files with 8 additions and 7 deletions

View File

@ -52,7 +52,7 @@ void print_upcoming(struct event *head, char current_start_date[], int show_all_
if (strcmp(head->start_date, current_start_date) >= 0) {
pretty_print_date_time(head->start_date);
print_end_date(head->end_date, head->start_date);
printf("\n%s\n", head->summary);
printf("\nSUMMARY: %s\n", head->summary);
if (!show_all_events) {
i++;

View File

@ -12,6 +12,7 @@ void parse_event(char event_string[], struct event **head)
char* start_date = strstr(event_string, "\nDTSTART");
char* end_date = strstr(event_string, "\nDTEND");
char* summary = strstr(event_string, "\nSUMMARY");
summary = strchr(summary, ':') + 1;
char* start_date_str = malloc(256);
char* end_date_str = malloc(256);