diff --git a/ngcompiler/lib/v1/src/compiler/view_compiler/expression_converter.dart b/ngcompiler/lib/v1/src/compiler/view_compiler/expression_converter.dart index b6bc3e133..f2629c8a9 100644 --- a/ngcompiler/lib/v1/src/compiler/view_compiler/expression_converter.dart +++ b/ngcompiler/lib/v1/src/compiler/view_compiler/expression_converter.dart @@ -151,7 +151,9 @@ class _AstToExpressionVisitor if (_metadata.template!.preserveWhitespace! || value.contains('\u00A0') || value.contains(ngSpace) || - !value.contains('\n')) return replaceNgSpace(value); + !value.contains('\n')) { + return replaceNgSpace(value); + } return replaceNgSpace(value.replaceAll('\n', '').trimLeft()); } @@ -161,7 +163,9 @@ class _AstToExpressionVisitor if (_metadata.template!.preserveWhitespace! || value.contains('\u00A0') || value.contains(ngSpace) || - !value.contains('\n')) return replaceNgSpace(value); + !value.contains('\n')) { + return replaceNgSpace(value); + } return replaceNgSpace(value.replaceAll('\n', '').trimRight()); }