summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrançois Revol <revol@free.fr>2018-03-20 11:26:29 +0100
committerrsiddharth <rsd@gnu.org>2018-03-22 04:16:50 +0000
commit8f83f1b38c108615e39c697c08f2172b8cafd8f8 (patch)
tree396dc4affb6e099dbe1c38c773a099703b8de2cc
parentca157748d3414538d4861d0d9f7a2e4c63b071e6 (diff)
lps_gen.py: Update the timeslot regex to make the name optional
Fixes ical generation.
-rw-r--r--lps_gen.py4
1 files changed, 2 insertions, 2 deletions
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+)')