Add tests and allow more liberal spacing with get/instant calls

This commit is contained in:
Kim Biesbjerg
2016-12-13 15:17:03 +01:00
parent ca8b122295
commit 8093370e94
9 changed files with 64 additions and 20 deletions

View File

@@ -15,7 +15,7 @@ export class PipeParser extends AbstractTemplateParser implements ParserInterfac
protected _parseTemplate(template: string): TranslationCollection {
let collection: TranslationCollection = new TranslationCollection();
const regExp = new RegExp(/(['"`])([^\1\r\n]*)\1\s*\|\s*translate(:.*?)?/, 'g');
const regExp = new RegExp(/(['"`])([^\1]*)\1\s*\|\s*translate/, 'g');
let matches: RegExpExecArray;
while (matches = regExp.exec(template)) {