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
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Mar 31, 2022
1 parent f4c25e0 commit 31ff2ef
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 31ff2ef

Please sign in to comment.