fix(compiler): skip when trimming / removing whitespaces (#19310)
Fixes #19304
This commit is contained in:

committed by
Victor Berchet

parent
9ad4b3bd31
commit
13613d4acb
@ -64,6 +64,16 @@ export function main() {
|
||||
expect(parseAndRemoveWS(' \n foo \t ')).toEqual([[html.Text, ' foo ', 0]]);
|
||||
});
|
||||
|
||||
it('should not replace ', () => {
|
||||
expect(parseAndRemoveWS(' ')).toEqual([[html.Text, '\u00a0', 0]]);
|
||||
});
|
||||
|
||||
it('should not replace sequences of ', () => {
|
||||
expect(parseAndRemoveWS(' foo ')).toEqual([
|
||||
[html.Text, '\u00a0\u00a0foo\u00a0\u00a0', 0]
|
||||
]);
|
||||
});
|
||||
|
||||
it('should not replace single tab and newline with spaces', () => {
|
||||
expect(parseAndRemoveWS('\nfoo')).toEqual([[html.Text, '\nfoo', 0]]);
|
||||
expect(parseAndRemoveWS('\tfoo')).toEqual([[html.Text, '\tfoo', 0]]);
|
||||
|
Reference in New Issue
Block a user