From f01c86457f062f58db6cec5db72619f3fce35668 Mon Sep 17 00:00:00 2001 From: Olzhas Suleimen Date: Fri, 13 Dec 2024 16:22:16 +0500 Subject: [PATCH] Wrap statements. --- .../src/compiler/view_compiler/expression_converter.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 b6bc3e133f..f2629c8a9e 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()); }