fix ordered list numeration for lists with more than one level of list (#1142)

pull/1145/head
spChief 2 years ago committed by GitHub
parent dfa2070e1c
commit f3b0fc83f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/src/widgets/style_widgets/number_point.dart

@ -30,7 +30,7 @@ class QuillNumberPoint extends StatelessWidget {
var s = index.toString();
int? level = 0;
if (!attrs.containsKey(Attribute.indent.key) &&
!indentLevelCounts.containsKey(1)) {
indentLevelCounts.isEmpty) {
indentLevelCounts.clear();
return Container(
alignment: AlignmentDirectional.topEnd,
@ -41,7 +41,7 @@ class QuillNumberPoint extends StatelessWidget {
}
if (attrs.containsKey(Attribute.indent.key)) {
level = attrs[Attribute.indent.key]!.value;
} else {
} else if (!indentLevelCounts.containsKey(0)) {
// first level but is back from previous indent level
// supposed to be "2."
indentLevelCounts[0] = 1;

Loading…
Cancel
Save