fix(compiler): i18n - trim whitespace from i18n custom ids (#34154)

Fixes #34147

PR Close #34154
This commit is contained in:
Pete Bacon Darwin
2019-12-03 08:36:56 +00:00
committed by Miško Hevery
parent 93ac362848
commit 64317c680d
3 changed files with 51 additions and 39 deletions

View File

@ -51,6 +51,12 @@ import {serializeNodes as serializeHtmlNodes} from '../ml_parser/util/util';
]);
});
it('should trim whitespace from custom ids (but not meanings)', () => {
expect(extract('<div i18n="\n m1|d1@@i1\n ">test</div>')).toEqual([
[['test'], '\n m1', 'd1', 'i1'],
]);
});
it('should extract from attributes without meaning and with id', () => {
expect(
extract(