poly-lexis 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/translations.js +10 -0
- package/dist/cli/translations.js.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/translations.js
CHANGED
|
@@ -1201,6 +1201,11 @@ function preserveVariables(text) {
|
|
|
1201
1201
|
variableMap.set(placeholder, match);
|
|
1202
1202
|
placeholderIndex++;
|
|
1203
1203
|
return placeholder;
|
|
1204
|
+
}).replace(/\{([^}]+)\}/g, (match) => {
|
|
1205
|
+
const placeholder = `XXX_${placeholderIndex}_XXX`;
|
|
1206
|
+
variableMap.set(placeholder, match);
|
|
1207
|
+
placeholderIndex++;
|
|
1208
|
+
return placeholder;
|
|
1204
1209
|
});
|
|
1205
1210
|
return { textWithPlaceholders, variableMap };
|
|
1206
1211
|
}
|
|
@@ -1295,6 +1300,11 @@ function preserveVariables2(text) {
|
|
|
1295
1300
|
variableMap.set(placeholder, match);
|
|
1296
1301
|
placeholderIndex++;
|
|
1297
1302
|
return placeholder;
|
|
1303
|
+
}).replace(/\{([^}]+)\}/g, (match) => {
|
|
1304
|
+
const placeholder = `XXX_${placeholderIndex}_XXX`;
|
|
1305
|
+
variableMap.set(placeholder, match);
|
|
1306
|
+
placeholderIndex++;
|
|
1307
|
+
return placeholder;
|
|
1298
1308
|
});
|
|
1299
1309
|
return { textWithPlaceholders, variableMap };
|
|
1300
1310
|
}
|