chore: Add start to ordered list
This commit is contained in:
parent
2869d341a6
commit
6cdfced81f
1 changed files with 4 additions and 1 deletions
|
|
@ -137,8 +137,11 @@ class HtmlMessage extends StatelessWidget {
|
||||||
text = '• $text';
|
text = '• $text';
|
||||||
}
|
}
|
||||||
if (node.parent?.parent?.localName == 'ol') {
|
if (node.parent?.parent?.localName == 'ol') {
|
||||||
|
final start =
|
||||||
|
int.tryParse(node.parent?.parent?.attributes['start'] ?? '1') ??
|
||||||
|
1;
|
||||||
text =
|
text =
|
||||||
'${(node.parent?.parent?.nodes.indexOf(node.parent) ?? 0) + 1}. $text';
|
'${(node.parent?.parent?.nodes.indexOf(node.parent) ?? 0) + start}. $text';
|
||||||
}
|
}
|
||||||
if (node.parent?.parent?.parent?.localName == 'li') {
|
if (node.parent?.parent?.parent?.localName == 'li') {
|
||||||
text = ' $text';
|
text = ' $text';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue