1
0

teach the locale system that sometimes braces are just braces

This commit is contained in:
dakkar
2024-06-12 15:06:01 +01:00
parent d53df1c5d2
commit f7898fa89d
5 changed files with 13 additions and 6 deletions
+4 -1
View File
@@ -6,7 +6,10 @@ import ts from 'typescript';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const parameterRegExp = /\{(\w+)\}/g;
// braces preceded by backslashes are literal, they don't represent
// parameters; they get cleaned up by `locales/index.js` before
// getting shipped to the browser
const parameterRegExp = /(?<!\\)\{(\w+)\}/g;
function createMemberType(item) {
if (typeof item !== 'string') {