Skip to content

Commit f5b2448

Browse files
committed
fix proper escaping issue
1 parent 78b8bce commit f5b2448

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/devextreme-schematics/src/migrate-nested-components/template-migrator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ function flattenTemplateExpression(
280280
}
281281

282282
function escapeBackticks(text: string): string {
283-
return text.replace(/`/g, '\\`');
283+
// First escape backslashes, then escape backticks
284+
return text.replace(/\\/g, '\\\\').replace(/`/g, '\\`');
284285
}
285286

286287
// Utilities

0 commit comments

Comments
 (0)