From 31ff2efcf1cc812f21ba8d6b1f6d6260815f495b Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 31 Mar 2022 16:14:29 +0100
Subject: [PATCH] Fix editing
tags with a non-1 start attribute
---
src/editor/deserialize.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/editor/deserialize.ts b/src/editor/deserialize.ts
index b3184f63f08..3b5c5e638b3 100644
--- a/src/editor/deserialize.ts
+++ b/src/editor/deserialize.ts
@@ -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++;