|
@@ -23,9 +23,11 @@ function appendHeading(
|
|
|
tags: string[]
|
|
|
): [INotebookHeading[], INotebookHeading | null] {
|
|
|
if (heading && !isHeadingFiltered(heading, tags) && heading.text) {
|
|
|
+ // Determine whether this heading is a child of a "header" notebook heading...
|
|
|
if (prev && prev.type === 'header') {
|
|
|
for (let j = headings.length - 1; j >= 0; j--) {
|
|
|
if (headings[j] === prev) {
|
|
|
+ // TODO: can a heading be the child of multiple headings? If not, we can `break` here upon finding a parent heading, so we don't traverse the entire heading list...
|
|
|
headings[j].hasChild = true;
|
|
|
}
|
|
|
}
|