diff --git a/src/compiler/optimize/prism.ts b/src/compiler/optimize/prism.ts index 2a96ab73d6..5c53647960 100644 --- a/src/compiler/optimize/prism.ts +++ b/src/compiler/optimize/prism.ts @@ -6,7 +6,7 @@ const PRISM_IMPORT = `import Prism from 'astro/components/Prism.astro';\n`; const prismImportExp = /import Prism from ['"]astro\/components\/Prism.astro['"]/; function escape(code: string) { - return code.replace(/[`$]/g, match => { + return code.replace(/[`$]/g, (match) => { return '\\' + match; }); }