@scrider/formatter 1.7.1 → 1.7.2

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.
package/dist/index.cjs CHANGED
@@ -2195,6 +2195,14 @@ function toCodeWidgetEmbedUrl(url) {
2195
2195
  const trimmed = base.replace(/\/+$/, "");
2196
2196
  return `${trimmed}/embedded/${query}${hash}`;
2197
2197
  }
2198
+ if (/(?:\/\/|^)(?:[\w-]+\.)*trinket\.io\//i.test(u)) {
2199
+ if (/trinket\.io\/embed\//i.test(u)) return u;
2200
+ return u.replace(/trinket\.io\//i, "trinket.io/embed/");
2201
+ }
2202
+ if (/(?:\/\/|^)(?:[\w-]+\.)*onecompiler\.com\//i.test(u)) {
2203
+ if (/onecompiler\.com\/embed\//i.test(u)) return u;
2204
+ return u.replace(/onecompiler\.com\//i, "onecompiler.com/embed/");
2205
+ }
2198
2206
  return u;
2199
2207
  }
2200
2208