Skip to content

Commit 89a89ba

Browse files
authored
Merge pull request Sub6Resources#652 from tneotia/bugfix/olstack-ul
Fix Bad State error when setting a ul to have an ol list type
2 parents 0874d55 + 2cd044e commit 89a89ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/html_parser.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ class HtmlParser extends StatelessWidget {
553553
tree.style.markerContent = '•';
554554
break;
555555
case ListStyleType.DECIMAL:
556+
if (olStack.isEmpty) {
557+
olStack.add(Context((tree.attributes['start'] != null ? int.tryParse(tree.attributes['start'] ?? "") ?? 1 : 1) - 1));
558+
}
556559
olStack.last.data += 1;
557560
tree.style.markerContent = '${olStack.last.data}.';
558561
break;

0 commit comments

Comments
 (0)