Skip to content
Snippets Groups Projects
Commit 12cabf13 authored by Volker Krause's avatar Volker Krause
Browse files

Fix address extraction in NH Hotel booking confirmations

parent af1af38f
No related branches found
No related tags found
No related merge requests found
......@@ -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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment