From 8f83f1b38c108615e39c697c08f2172b8cafd8f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Tue, 20 Mar 2018 11:26:29 +0100 Subject: lps_gen.py: Update the timeslot regex to make the name optional Fixes ical generation. --- lps_gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lps_gen.py') diff --git a/lps_gen.py b/lps_gen.py index 23da7b9..acaabf2 100644 --- a/lps_gen.py +++ b/lps_gen.py @@ -119,8 +119,8 @@ class LPiCal(object): self.lp_year = str(lp_year) # Matches strings like '09:45 - 10:30: Lorem ipsum dolor sit.' - self.timeslot_re = re.compile(r'(\d+:\d+).+?(\d+:\d+):' - + r'\s*(.+\b)') + self.timeslot_re = re.compile(r'(\d+:\d+).+?(\d+:\d+)' + + r':?\s*(.+\b)?') # Matches strings like 'Saturday, March 19' self.month_day_re = re.compile(r'\w+,\s*([a-zA-Z]+)\s*(\d+)') -- cgit v1.2.3