Skip to content

Commit 2e9f2f0

Browse files
authored
Merge pull request Sub6Resources#923 from vrtdev/bugfix/921-list-tab-char-box
Fix list spacing render issue displaying a box
2 parents d906120 + 1e8b8f0 commit 2e9f2f0

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
@@ -403,9 +403,11 @@ class HtmlParser extends StatelessWidget {
403403
);
404404
} else if (tree.style.display == Display.LIST_ITEM) {
405405
List<InlineSpan> getChildren(StyledElement tree) {
406-
InlineSpan tabSpan = WidgetSpan(child: Text("\t", textAlign: TextAlign.right));
407406
List<InlineSpan> children = tree.children.map((tree) => parseTree(newContext, tree)).toList();
408407
if (tree.style.listStylePosition == ListStylePosition.INSIDE) {
408+
final tabSpan = WidgetSpan(
409+
child: Text("\t", textAlign: TextAlign.right, style: TextStyle(fontWeight: FontWeight.w400)),
410+
);
409411
children.insert(0, tabSpan);
410412
}
411413
return children;
@@ -427,7 +429,7 @@ class HtmlParser extends StatelessWidget {
427429
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),
428430
child: newContext.style.markerContent
429431
) : Container(height: 0, width: 0),
430-
Text("\t", textAlign: TextAlign.right),
432+
Text("\t", textAlign: TextAlign.right, style: TextStyle(fontWeight: FontWeight.w400)),
431433
Expanded(
432434
child: Padding(
433435
padding: tree.style.listStylePosition == ListStylePosition.INSIDE ?

0 commit comments

Comments
 (0)