Commit a296a2fd authored by Volker Krause's avatar Volker Krause
Browse files

Relax ZSSK arrival time regex a bit

Arrival station names can be very long.
parent acbfe408
Pipeline #196678 passed with stage
in 11 minutes and 44 seconds
......@@ -52,7 +52,7 @@ function parseDomesticBarcode(data) {
function parseDomesticPdf(pdf, node, triggerNode) {
const text = pdf.pages[triggerNode.location].text;
// TODO multi-leg support?
const leg = text.match(/\d{2}\.\d{2}.\d{2} +\d{2}:\d{2} +.* -> .* +(\d{2}\.\d{2}\.\d{2} +\d{2}:\d{2})/);
const leg = text.match(/\d{2}\.\d{2}.\d{2} +\d{2}:\d{2} +.* -> .* +(\d{2}\.\d{2}\.\d{2} +\d{2}:\d{2})/);
let res = triggerNode.result[0];
res.reservationFor.arrivalTime = JsonLd.toDateTime(leg[1], 'dd.MM.yy hh:mm', 'sk');
return res;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment