From 04e79dffae77cec0f6072c01e404f9bf5c30dcd5 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 31 Mar 2022 18:40:51 +0100
Subject: [PATCH] Fix editing
tags with a non-1 start attribute (#8211)
---
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 b3184f63f0..3b5c5e638b 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++;