From 26a007edafd5142991fe00bc9b560c49413859cd Mon Sep 17 00:00:00 2001 From: David Prothero Date: Sun, 29 Oct 2023 18:26:31 -0700 Subject: [PATCH] Fix JSON major changes detection --- src/formats/json.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/formats/json.ts b/src/formats/json.ts index ad04b8d..f79802f 100644 --- a/src/formats/json.ts +++ b/src/formats/json.ts @@ -167,7 +167,7 @@ export async function convertToJson(docType: DocType): Promise { tree.children.shift(); } - keys.add(id + "/" + newSubsection.id); + keys.add(id + "/" + newSubsection.id + "/0"); let textSubsection: SubSectionMarkdown = { type: "paragraph", @@ -284,7 +284,7 @@ export async function convertToJson(docType: DocType): Promise { previousKeys = new Set( previousOutput.sections.flatMap((section) => section.subsections.flatMap((subsection) => - [`${section.id}`, `${section.id}/${subsection.id}`].concat( + [`${section.id}`, `${section.id}/${subsection.id}/0`].concat( subsection.content.flatMap((content) => [ `${section.id}/${subsection.id}/${content.order}`, ])