Skip to content

Commit

Permalink
Merge pull request #197 from ieow/feat/better-escape
Browse files Browse the repository at this point in the history
Feat/better escape
  • Loading branch information
inokawa authored Oct 14, 2024
2 parents 4f1d72a + 6fe5de0 commit d26d920
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export const createTransformer = (
...args,
src:
"export default String.raw`" +
escape(res).replace(/\$\{(.*?)\}/g, "\\$\\{$1\\}") +
"`.replace(/\\\\([`${}])/g, '\\$1')",
escape(res).replace(/\$/g, '\\$') +
"`.replace(/\\\\([`$])/g, '\\$1')",
});
}

Expand Down

0 comments on commit d26d920

Please sign in to comment.