From 5c7cf884235fd1a65e83091793e525451e317d8c Mon Sep 17 00:00:00 2001 From: rstular Date: Sun, 17 May 2020 14:07:41 +0200 Subject: Bug fix - GSEC regex matching --- dist/js/gsec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dist/js') diff --git a/dist/js/gsec.js b/dist/js/gsec.js index 6bd8f52..6c3de0f 100644 --- a/dist/js/gsec.js +++ b/dist/js/gsec.js @@ -290,7 +290,7 @@ class gsec { fetchTeachers() { // razrednika ne vrne kot razrednika, če le-ta uči še en predmet. razlog: razrednik je napisan dvakrat, drugič se prepiše. Ne da se mi popravljat. - const SUBJECT_REGEX = /^(.+?) \(/; + const SUBJECT_REGEX = /^(.+?(?= \()|.+(?! \())/; // For some reason, JS doesn't support conditional regex const ABKURZUNG_REGEX = /\((.+?)\)/; const DAY_REGEX = /^(.+?), /; const PERIOD_REGEX = /, (\d+?)\. ura/; -- cgit v1.2.3