Added a filter for any \r's or \n's
This commit is contained in:
parent
74e5c6bcb9
commit
298f5d5615
|
@ -11,7 +11,7 @@ div.schedule
|
||||||
div.hour.title
|
div.hour.title
|
||||||
span= days[match.json.indexOf(day)]
|
span= days[match.json.indexOf(day)]
|
||||||
each hour in day
|
each hour in day
|
||||||
if hour.teacher != 'vrij\r' && hour.teacher != 'vrij'
|
if hour.teacher != 'vrij'
|
||||||
div.hour(class=hour.changed == 'true' ? 'changed' : '')
|
div.hour(class=hour.changed == 'true' ? 'changed' : '')
|
||||||
each subhour in hour.teacher
|
each subhour in hour.teacher
|
||||||
span.teacher(class='sub_' + hour.teacher.length)
|
span.teacher(class='sub_' + hour.teacher.length)
|
||||||
|
|
|
@ -51,7 +51,7 @@ function to_json(page) {
|
||||||
for (subhour = 0; subhour < amount_of_special_hours; subhour++) {
|
for (subhour = 0; subhour < amount_of_special_hours; subhour++) {
|
||||||
var selected_hour = schedule.find('table').eq(day).find('tr').eq(subhour).find('td');
|
var selected_hour = schedule.find('table').eq(day).find('tr').eq(subhour).find('td');
|
||||||
//Give the value of the schedule hour to the fitting array.
|
//Give the value of the schedule hour to the fitting array.
|
||||||
schedule_data[day][hour].teacher[subhour] = selected_hour.eq(0).text();
|
schedule_data[day][hour].teacher[subhour] = selected_hour.eq(0).text().replace(/\r|\n/g, '');
|
||||||
schedule_data[day][hour].chamber[subhour] = selected_hour.eq(2).text();
|
schedule_data[day][hour].chamber[subhour] = selected_hour.eq(2).text();
|
||||||
schedule_data[day][hour].course[subhour] = selected_hour.eq(4).text();
|
schedule_data[day][hour].course[subhour] = selected_hour.eq(4).text();
|
||||||
//Check if the hour is 'changed' by the schedule authors, if so set to true.
|
//Check if the hour is 'changed' by the schedule authors, if so set to true.
|
||||||
|
|
Loading…
Reference in a new issue