diff --git a/lib/src/builtins/styled_element_builtin.dart b/lib/src/builtins/styled_element_builtin.dart index 08a9f49db1..349486c595 100644 --- a/lib/src/builtins/styled_element_builtin.dart +++ b/lib/src/builtins/styled_element_builtin.dart @@ -434,7 +434,8 @@ class StyledElementBuiltIn extends HtmlExtension { child.value, if (context.parser.shrinkWrap && i != context.styledElement!.children.length - 1 && - child.key.style.display == Display.block && + (child.key.style.display == Display.block || + child.key.style.display == Display.listItem) && child.key.element?.localName != "html" && child.key.element?.localName != "body") const TextSpan(text: "\n", style: TextStyle(fontSize: 0)),