Skip to content

Commit 1e8b8f0

Browse files
committed
Fix list spacing render issue displaying a box since low font weight rendering on iOS for tabs is bugged; fixes Sub6Resources#921
1 parent a8467db commit 1e8b8f0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/html_parser.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,11 @@ class HtmlParser extends StatelessWidget {
401401
);
402402
} else if (tree.style.display == Display.LIST_ITEM) {
403403
List<InlineSpan> getChildren(StyledElement tree) {
404-
InlineSpan tabSpan = WidgetSpan(child: Text("\t", textAlign: TextAlign.right));
405404
List<InlineSpan> children = tree.children.map((tree) => parseTree(newContext, tree)).toList();
406405
if (tree.style.listStylePosition == ListStylePosition.INSIDE) {
406+
final tabSpan = WidgetSpan(
407+
child: Text("\t", textAlign: TextAlign.right, style: TextStyle(fontWeight: FontWeight.w400)),
408+
);
407409
children.insert(0, tabSpan);
408410
}
409411
return children;
@@ -425,7 +427,7 @@ class HtmlParser extends StatelessWidget {
425427
padding: tree.style.padding ?? EdgeInsets.only(left: tree.style.direction != TextDirection.rtl ? 10.0 : 0.0, right: tree.style.direction == TextDirection.rtl ? 10.0 : 0.0),
426428
child: newContext.style.markerContent
427429
) : Container(height: 0, width: 0),
428-
Text("\t", textAlign: TextAlign.right),
430+
Text("\t", textAlign: TextAlign.right, style: TextStyle(fontWeight: FontWeight.w400)),
429431
Expanded(
430432
child: Padding(
431433
padding: tree.style.listStylePosition == ListStylePosition.INSIDE ?

0 commit comments

Comments
 (0)