Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix editing <ol> tags with a non-1 start attribute (#8211)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Mar 31, 2022
1 parent 17cfd45 commit 04e79df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor/deserialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 04e79df

Please sign in to comment.