diff --git a/src/stores/craftcellars.js b/src/stores/craftcellars.js index 49f45e1..81b89d9 100644 --- a/src/stores/craftcellars.js +++ b/src/stores/craftcellars.js @@ -142,11 +142,9 @@ function cfgNum(v, fallback) { function extractCraftSkuFromProductPageHtml(html) { const s = String(html || ""); + // allow any content between and (including newlines, other tags) const m = - s.match( - /\s*SKU:\s*<\/strong>\s*\s*([^<]{1,80}?)\s*<\/span>/i - ) || - s.match(/\bSKU:\s*<\/strong>\s*\s*([^<]{1,80}?)\s*<\/span>/i) || + s.match(/\s*SKU:\s*<\/strong>[\s\S]{0,200}?\s*([^<]{1,80}?)\s*<\/span>/i) || s.match(/\bSKU:\s*([A-Za-z0-9][A-Za-z0-9\-_/ ]{0,40})/i); const raw = m && m[1] ? stripTags(decodeHtml(m[1])) : "";