Skip to content

Commit d9ceb1d

Browse files
committed
Fix br tags not breaking the line, fixes Sub6Resources#851
1 parent b03ea06 commit d9ceb1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/html_parser.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,8 @@ class HtmlParser extends StatelessWidget {
944944
if (child is EmptyContentElement || child is EmptyLayoutElement) {
945945
toRemove.add(child);
946946
} else if (child is TextContentElement
947-
&& tree.name == "body"
948-
&& child.text!.trim().isEmpty) {
947+
&& tree.name == "body"
948+
&& child.text!.replaceAll(' ', '').isEmpty) {
949949
toRemove.add(child);
950950
} else if (child is TextContentElement
951951
&& child.text!.isEmpty

0 commit comments

Comments
 (0)