From a6b27a276c6da60d7fa21c5d767ef7d38c9fac2a Mon Sep 17 00:00:00 2001 From: rstular Date: Sun, 17 May 2020 14:21:27 +0200 Subject: GSEC bug fix - fetch teachers Subject with parenthesis in their name got improperly matched because of a lazy flag. Now it's removed, it works properly. --- assets/js/gsec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assets') diff --git a/assets/js/gsec.js b/assets/js/gsec.js index d0e5fbb..c961c23 100644 --- a/assets/js/gsec.js +++ b/assets/js/gsec.js @@ -291,7 +291,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 = /^(.+?(?= \()|.+(?! \())/; // For some reason, JS doesn't support conditional regex - const ABKURZUNG_REGEX = /\((.+?)\)/; + const ABKURZUNG_REGEX = /\((.+)\)/; const DAY_REGEX = /^(.+?), /; const PERIOD_REGEX = /, (\d+?)\. ura/; const TIME_RANGE_REGEX = /\((.+?) - (.+?)\)/; -- cgit v1.2.3