fix: Index of numbered lists are off
This commit is contained in:
parent
221c3ef6bd
commit
20220d21fd
1 changed files with 1 additions and 1 deletions
|
|
@ -228,7 +228,7 @@ class HtmlMessage extends StatelessWidget {
|
||||||
if (node.parent?.localName == 'ol')
|
if (node.parent?.localName == 'ol')
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
'${(node.parent?.nodes.indexOf(node) ?? 0) + (int.tryParse(node.parent?.attributes['start'] ?? '1') ?? 1)}. ',
|
'${(node.parent?.nodes.whereType<dom.Element>().toList().indexOf(node) ?? 0) + (int.tryParse(node.parent?.attributes['start'] ?? '1') ?? 1)}. ',
|
||||||
),
|
),
|
||||||
..._renderWithLineBreaks(
|
..._renderWithLineBreaks(
|
||||||
node.nodes,
|
node.nodes,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue