Fix bug in DirectiveParser: should not extract translate pipe in html tag

This commit is contained in:
Kim Biesbjerg
2016-12-10 04:14:13 +01:00
parent 4307e4bde8
commit 43df1f0fb8
2 changed files with 10 additions and 2 deletions

View File

@@ -98,4 +98,10 @@ describe('DirectiveParser', () => {
expect(keys).to.deep.equal(['KEY']);
});
it('should not extract translate pipe in html tag', () => {
const contents = `<p>{{ 'Audiobooks for personal development' | translate }}</p>`;
const collection = parser.extract(contents, templateFilename);
expect(collection.values).to.deep.equal({});
});
});