We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d90a1c commit 20b8408Copy full SHA for 20b8408
1 file changed
src/hook-inline.ts
@@ -6,7 +6,7 @@ import { SandboxOptions } from "./sandpack";
6
const escapeHTMLComment = (content: string) => {
7
// It will be restored when parsing comment
8
// to avoid break -->
9
- return content.replace(/<!--/g, "\\u003c\\u0021\\u002d\\u002d").replace(/"-->"/g, "\\u002d\\u002d\\u003e");
+ return content.split("<!--").join("\\u003c\\u0021\\u002d\\u002d").split("-->").join("\\u002d\\u002d\\u003e");
10
};
11
export const inlineFiles = (content: string, filePath: string) => {
12
const baseDir = path.dirname(filePath);
0 commit comments