@wix/blog 1.0.718 → 1.0.719

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1142,12 +1142,14 @@ var lr = (e6, t2) => {
1142
1142
  if (!n2 || !t2?.endsWith(r2)) return;
1143
1143
  let i2, a2;
1144
1144
  try {
1145
- i2 = new URL(n2).pathname, a2 = new URL(t2).pathname;
1145
+ i2 = new URL(n2), a2 = new URL(t2);
1146
1146
  } catch {
1147
1147
  return;
1148
1148
  }
1149
- let o2 = a2.slice(0, -r2.length);
1150
- return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
1149
+ let { pathname: o2 } = i2, s2 = a2.pathname, c2 = s2.slice(0, -r2.length), l2 = c2.slice(0, c2.lastIndexOf(`/`));
1150
+ if (!c2 || o2.startsWith(`${s2}/`)) return;
1151
+ let u2 = o2.startsWith(`${c2}/`), d2 = o2.split(`/`), { slug: f2 } = e6, p2 = f2 ? d2.includes(f2) || d2.includes(encodeURIComponent(f2)) : false, m2 = i2.origin === a2.origin && o2.startsWith(`${l2}/`) && p2;
1152
+ return u2 || m2 ? n2 : void 0;
1151
1153
  };
1152
1154
  var ur = (e6, t2) => {
1153
1155
  let n2 = lr(e6, t2);