From 60a79e411cde1c13be178d61b6c044622a2a0433 Mon Sep 17 00:00:00 2001 From: Sting <loic.allegre@ensiie.fr> Date: Mon, 24 Jul 2023 18:52:22 +0200 Subject: [PATCH] Fix bug occurring when lyrics have commas in them --- autosyl/assUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autosyl/assUtils.py b/autosyl/assUtils.py index 7d2e6c2..cefbfa1 100644 --- a/autosyl/assUtils.py +++ b/autosyl/assUtils.py @@ -59,7 +59,7 @@ def getHeader(ass_file): if re.match("^\[Events\].*", line): events_section = True else: - event_regex = "(?:Format:.*)|(?:^Comment:.*(\d+:\d{2}:\d{2}.\d{2}),(\d+:\d{2}:\d{2}.\d{2}),.*,((?!karaoke).)*,((?!karaoke).)*\n$)" + event_regex = "(?:Format:.*)|(?:^Comment:.*(\d+:\d{2}:\d{2}.\d{2}),(\d+:\d{2}:\d{2}.\d{2}),[^,]*,((?!karaoke).)*,((?!karaoke).)*\n$)" if re.match(event_regex, line): HEADER += line return HEADER -- GitLab