From 2634a4e3165a36a914f9113c9e4ab3b5b09b3344 Mon Sep 17 00:00:00 2001 From: raizasafeel <89463672+raizasafeel@users.noreply.github.com> Date: Mon, 23 Feb 2026 15:12:08 +0530 Subject: [PATCH] fix(lesson): render codesandbox properly --- frontend/src/utils/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index f560d061..0a7a5826 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -236,10 +236,10 @@ export function getEditorTools() { html: "", }, codesandbox: { - regex: /^https:\/\/codesandbox\.io\/(?:embed\/)?([A-Za-z0-9_-]+)(?:\?[^\/]*)?$/, + regex: /^https:\/\/codesandbox\.io\/(?:(?:p\/(?:sandbox|devbox)\/)|(?:embed\/)|(?:s\/))?([A-Za-z0-9_-]+)(?:[\/\?].*)?$/, embedUrl: 'https://codesandbox.io/embed/<%= remote_id %>?view=editor+%2B+preview&module=%2Findex.html', - html: "", + html: "", }, }, },