diff --git a/lib/html_parser.dart b/lib/html_parser.dart index c4e70ed785..48c4415182 100644 --- a/lib/html_parser.dart +++ b/lib/html_parser.dart @@ -342,7 +342,8 @@ class HtmlParser extends StatelessWidget { } //Return the correct InlineSpan based on the element type. - if (tree.style.display == Display.BLOCK && tree.children.isNotEmpty) { + if (tree.style.display == Display.BLOCK && + (tree.children.isNotEmpty || tree.element?.localName == "hr")) { if (newContext.parser.selectable) { return TextSpan( style: newContext.style.generateTextStyle(), diff --git a/lib/src/styled_element.dart b/lib/src/styled_element.dart index 164f243434..f3331fc045 100644 --- a/lib/src/styled_element.dart +++ b/lib/src/styled_element.dart @@ -248,7 +248,8 @@ StyledElement parseStyledElement( styledElement.style = Style( margin: EdgeInsets.symmetric(vertical: 7.0), width: double.infinity, - border: Border(bottom: BorderSide(width: 1.0)), + height: 1, + backgroundColor: Colors.black, display: Display.BLOCK, ); break;