@epic-web/workshop-utils 6.84.2 → 6.84.3

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.
@@ -478,6 +478,11 @@ function parseEpicLessonSlugFromEmbedUrl(urlString) {
478
478
  const last = segments.at(-1) ?? null;
479
479
  if (!last)
480
480
  return { lessonSlug: null, subpage: null };
481
+ // `/embed` can be appended to either the lesson page itself or a
482
+ // `/problem`/`/solution` subpage (e.g. `/lesson/solution/embed`). Strip it
483
+ // first so we can apply the subpage logic consistently.
484
+ if (last === 'embed')
485
+ return parseSegments(segments.slice(0, -1));
481
486
  if (isProblemOrSolutionSubpage(last)) {
482
487
  const slug = segments.at(-2) ?? null;
483
488
  return {
@@ -485,13 +490,6 @@ function parseEpicLessonSlugFromEmbedUrl(urlString) {
485
490
  subpage: last,
486
491
  };
487
492
  }
488
- if (last === 'embed') {
489
- const slug = segments.at(-2) ?? null;
490
- return {
491
- lessonSlug: slug ? stripEpicAiSlugSuffix(slug) : null,
492
- subpage: null,
493
- };
494
- }
495
493
  return { lessonSlug: stripEpicAiSlugSuffix(last), subpage: null };
496
494
  };
497
495
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epic-web/workshop-utils",
3
- "version": "6.84.2",
3
+ "version": "6.84.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },