Fix editing <ol> tags with a non-1 start attribute (#8211)

pull/21833/head
Michael Telatynski 2022-03-31 18:40:51 +01:00 committed by GitHub
parent 17cfd45eb3
commit 04e79dffae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ function parseNode(n: Node, pc: PartCreator, mkListItem?: (li: Node) => Part[]):
return parts;
}
case "OL": {
let counter = 1;
let counter = (n as HTMLOListElement).start ?? 1;
const parts = parseChildren(n, pc, li => {
const parts = [pc.plain(`${counter}. `), ...parseChildren(li, pc)];
counter++;