Skip to content

Commit

Permalink
Use escape-mechanism that is compatible with String.raw
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaskorz committed Dec 22, 2022
1 parent a51372c commit 66e1a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/generate/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ export function serializeProjection(projection: ProjectionSegment[]): string {
}

function escapeTemplateCode(input: string): string {
return input.replaceAll("`", "\\`").replaceAll("${", "\\${");
return input.replaceAll("${", '${"${"}').replaceAll("`", '${"`"}');
}

0 comments on commit 66e1a71

Please sign in to comment.