Skip to content

Commit

Permalink
fix: use simple replace
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed May 28, 2022
1 parent 4d1975a commit 5d90a1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hook-inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { SandboxOptions } from "./sandpack";
const escapeHTMLComment = (content: string) => {
// It will be restored when parsing comment
// to avoid break -->
return content.split("<!--").join("\\u003c\\u0021\\u002d\\u002d").split("-->").join("\\u002d\\u002d\\u003e");
return content.replace(/<!--/g, "\\u003c\\u0021\\u002d\\u002d").replace(/"-->"/g, "\\u002d\\u002d\\u003e");
};
export const inlineFiles = (content: string, filePath: string) => {
const baseDir = path.dirname(filePath);
Expand Down

0 comments on commit 5d90a1c

Please sign in to comment.