From 3e8f58b4b1d2fd7ce702b96ee36fd09f71e2fc23 Mon Sep 17 00:00:00 2001 From: Bram van der Veen <96aa48@gmail.com> Date: Sat, 15 Aug 2015 17:00:27 +0200 Subject: [PATCH] Fixed issue with schedule name parsing, try number 2 --- schedule.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/schedule.js b/schedule.js index 25d288c..d43821c 100644 --- a/schedule.js +++ b/schedule.js @@ -13,7 +13,7 @@ function get(req, res, next) { } function api(lookup, callback) { - get_schedule(lookup.data[0].url, callback) + get_schedule(lookup.data[0].url, callback); } //Function for getting the page via http. @@ -41,11 +41,11 @@ function schedule_types(page) { var types = []; for (element of extract) { - element != '' ? types.push({ - 'letter': element.substr(0, 1), - 'value' : element.match(/.*rooster|t\/m|\d\d\s\w{3}/g).join(' ').slice(1), - 'tab': tab++ - }) : null; + element != '' ? types.push({ + 'letter': element.substr(0, 1), + 'value' : element.match(/.*rooster|t\/m|\d\d\s\w{3}/gi).join(' ').slice(1).toLowerCase(), + 'tab': tab++ + }) : null; } return types;