From 3cdbb9605c68a444aac0b9618aa979a7bfa21937 Mon Sep 17 00:00:00 2001 From: imperosol Date: Fri, 4 Sep 2026 15:47:46 +0200 Subject: [PATCH] fix: timetable regex --- timetable/static/bundled/timetable/generator-index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timetable/static/bundled/timetable/generator-index.ts b/timetable/static/bundled/timetable/generator-index.ts index 5303a457..4b55401b 100644 --- a/timetable/static/bundled/timetable/generator-index.ts +++ b/timetable/static/bundled/timetable/generator-index.ts @@ -1,8 +1,8 @@ import html2canvas from "html2canvas"; -// see https://regex101.com/r/QHSaPM/2 +// see https://regex101.com/r/QHSaPM/3 const TIMETABLE_ROW_RE: RegExp = - /^(?\w.+\w)\s+(?[A-Z]{2}\d)\s+((?[AB])\s+)?(?(lundi)|(mardi)|(mercredi)|(jeudi)|(vendredi)|(samedi)|(dimanche))\s+(?\d{2}:\d{2})\s+(?\d{2}:\d{2})\s+[\dA-B]\s+((?[\wé]*)\s+)?(?\w+(?:, \w+)?)$/; + /^(?\w.+\w)\s+(?[A-Z]{2}\d)\s+((?[AB])\s+)?(?(lundi)|(mardi)|(mercredi)|(jeudi)|(vendredi)|(samedi)|(dimanche))\s+(?\d{2}:\d{2})\s+(?\d{2}:\d{2})\s+[\dA-B]\s+((?[\wé]*)\s+)?(?\w+(?:, \w+)*)$/; const DEFAULT_TIMETABLE: string = `DS52\t\tCM1\t\tlundi\t08:00\t10:00\t1\tPrésentiel\tA113 DS53\t\tCM1\t\tlundi\t10:15\t12:15\t1\tPrésentiel\tA101