Skip to content

Commit

Permalink
Fix JSON major changes detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dprothero committed Oct 30, 2023
1 parent 9823817 commit 26a007e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/formats/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export async function convertToJson(docType: DocType): Promise<boolean> {
tree.children.shift();
}

keys.add(id + "/" + newSubsection.id);
keys.add(id + "/" + newSubsection.id + "/0");

let textSubsection: SubSectionMarkdown = {
type: "paragraph",
Expand Down Expand Up @@ -284,7 +284,7 @@ export async function convertToJson(docType: DocType): Promise<boolean> {
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}`,
])
Expand Down

0 comments on commit 26a007e

Please sign in to comment.