feat: render OneNote notebook hierarchy
This commit is contained in:
@@ -8,6 +8,7 @@ import type { ParserDiagnostic } from '../model/diagnostics.js';
|
||||
import { checkCancellation } from './cancellation.js';
|
||||
import { extractCabinet } from './cabinet.js';
|
||||
import { diagnosticFromUnknown, OnePkgError, warning } from './errors.js';
|
||||
import { buildOneNotePackageTree } from './toc-hierarchy.js';
|
||||
import type {
|
||||
CabOpenOptions,
|
||||
ExtractedCabFile,
|
||||
@@ -162,6 +163,12 @@ export async function openOneNotePackage(
|
||||
});
|
||||
}
|
||||
|
||||
const treeResult = buildOneNotePackageTree(
|
||||
extraction.extractedEntries,
|
||||
packagedSections
|
||||
);
|
||||
diagnostics.push(...treeResult.diagnostics);
|
||||
|
||||
return {
|
||||
package: {
|
||||
format: 'onepkg',
|
||||
@@ -169,6 +176,7 @@ export async function openOneNotePackage(
|
||||
sourceSize: bytes.byteLength,
|
||||
entries: packageEntries,
|
||||
sections: packagedSections,
|
||||
tree: treeResult.tree,
|
||||
diagnostics,
|
||||
},
|
||||
extractedEntries: extraction.extractedEntries,
|
||||
|
||||
Reference in New Issue
Block a user