Commit 12cabf13 authored by Volker Krause's avatar Volker Krause
Browse files

Fix address extraction in NH Hotel booking confirmations

parent af1af38f
......@@ -34,7 +34,7 @@ function parseHtml(doc) {
res.reservationFor.name = nameElem.content;
var addrElem = nameElem.parent.nextSibling.nextSibling.nextSibling.firstChild;
var addr = addrElem.content.match(/([^,]*), (.*)/);
var addr = addrElem.content.match(/(.*), ?([^,]*)/);
res.reservationFor.address = JsonLd.newObject("PostalAddress");
res.reservationFor.address.streetAddress = addr[1];
res.reservationFor.address.addressLocality = addr[2];
......
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