@acorex/core 20.10.15 → 20.10.16
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.
|
@@ -173,12 +173,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
173
173
|
class TranslationParserService {
|
|
174
174
|
constructor() {
|
|
175
175
|
this.legacyRegex = /t\(["']([^"']+)["']\s*(?:,\s*(\{.*?\}))?\)/g;
|
|
176
|
-
this.inlineRegex = /@([a-zA-Z\-]+:)?([a-zA-Z0-9_-]+):([a-zA-Z0-9_
|
|
176
|
+
this.inlineRegex = /@([a-zA-Z\-]+:)?([a-zA-Z0-9_-]+):([a-zA-Z0-9_][a-zA-Z0-9_.-]*)/g;
|
|
177
177
|
}
|
|
178
178
|
isExpression(value) {
|
|
179
179
|
return typeof value === 'string' && (value.includes('t(') || value.includes('@'));
|
|
180
180
|
}
|
|
181
181
|
parse(expression, currentLang, currentScope) {
|
|
182
|
+
this.inlineRegex.lastIndex = 0;
|
|
183
|
+
this.legacyRegex.lastIndex = 0;
|
|
182
184
|
const tokens = [];
|
|
183
185
|
// Extract inline references like @lang:scope:key or @scope:key
|
|
184
186
|
let inlineMatch;
|