Fix bug where keys were being extracted when not accessing TranslationService property

This commit is contained in:
Kim Biesbjerg
2017-01-28 15:06:05 +01:00
parent 04429bdb44
commit 303fb1b6de
2 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ export class ServiceParser implements ParserInterface {
}
const methodRegExp: RegExp = /(?:get|instant)\s*\(\s*(\[?\s*(['"`])([^\1\r\n]*)\2\s*\]?)/;
const regExp: RegExp = new RegExp(`${translateServiceVar}\.${methodRegExp.source}`, 'g');
const regExp: RegExp = new RegExp(`\\.${translateServiceVar}\\.${methodRegExp.source}`, 'g');
let matches: RegExpExecArray;
while (matches = regExp.exec(contents)) {