Skip to content

Commit

Permalink
Fix section content type (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
smigles authored Sep 29, 2023
1 parent f768777 commit b83b0ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wikitext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export interface Section {
level: number;
header: string | null;
index: number;
content?: string;
content: string;
}

/**
Expand Down Expand Up @@ -476,7 +476,7 @@ export function parseSections(text: string): Section[] {
level: 1,
header: null,
index: 0,
},
} as Section,
];
let match;
while ((match = rgx.exec(text))) {
Expand All @@ -485,7 +485,7 @@ export function parseSections(text: string): Section[] {
level: match[1].length,
header: match[2].trim(),
index: match.index,
});
} as Section);
}
let n = sections.length;
for (let i = 0; i < n - 1; i++) {
Expand Down

0 comments on commit b83b0ae

Please sign in to comment.