Skip to content

Commit 681402b

Browse files
committed
fix: regex for support es5
1 parent eb46db3 commit 681402b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/write/WriteMarkdownEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ const checker = {
11211121
},
11221122
codesandbox: (text: string) => {
11231123
const regex =
1124-
/^<iframe.*src="https:\/\/codesandbox.io\/embed\/(.*?)".*<\/iframe>$/s;
1124+
/^<iframe[\s\S]*src="https:\/\/codesandbox.io\/embed\/(.*?)"[\s\S]*<\/iframe>$/;
11251125
const result = regex.exec(text);
11261126
if (!result) return null;
11271127
return result[1];

0 commit comments

Comments
 (0)