Skip to content

Commit

Permalink
fix: try to copy children where there is only one "output" object
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Jan 16, 2025
1 parent 3ead27f commit 13237e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/myst-compat/src/upgrade/version_1_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ export function upgrade(ast: Parent) {
// 2. lift `identifier` and `html_id` labels to `Outputs`
// 3. lift `visibility` to `Outputs`
// assert node.children.length === 1
const children = node.data?.length === 1 ? [...(node.children as any[])] : [];
const outputsChildren = (node.data ?? []).map((outputData) => {
const result: Output2 = {
type: 'output',
jupyter_data: outputData,
children: [], // FIXME: ignoring children here
children, // FIXME: ignoring children here
};
children.length = 0;
return result;
});

Expand Down

0 comments on commit 13237e1

Please sign in to comment.