From 7ae3bcdc0fa69014391a262258a41c9e1c11dd11 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Wed, 25 Aug 2021 12:53:46 -0700 Subject: [PATCH] Fix escape char not interpreted in expressions --- lib/common/expression-parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/expression-parser.ts b/lib/common/expression-parser.ts index 4830130..5ce675a 100644 --- a/lib/common/expression-parser.ts +++ b/lib/common/expression-parser.ts @@ -29,7 +29,7 @@ function interpretEscapes(str): string { r: "\r", t: "\t", }; - return str.replace(/\\(u[0-9a-fA-F]{4}|[^u])/, (_, escape) => { + return str.replace(/\\(u[0-9a-fA-F]{4}|[^u])/g, (_, escape) => { const type = escape.charAt(0); const hex = escape.slice(1); if (type === "u") return String.fromCharCode(parseInt(hex, 16));