Skip to content

Commit cee428d

Browse files
agoose77fwkoch
authored andcommitted
refactor: nest declaration
1 parent 771dcdf commit cee428d

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

packages/myst-cli/src/process/notebook.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,19 +170,14 @@ export async function processNotebookFull(
170170
value: ensureString(cell.source),
171171
};
172172

173-
const outputsChildren = (cell.outputs as IOutput[]).map((output) => {
174-
// Embed outputs in an output block
175-
const result = {
176-
type: 'output',
177-
jupyter_data: output,
178-
children: [],
179-
};
180-
return result;
181-
});
182173
const outputs = {
183174
type: 'outputs',
184175
id: nanoid(),
185-
children: outputsChildren,
176+
children: (cell.outputs as IOutput[]).map((output) => ({
177+
type: 'output',
178+
jupyter_data: output,
179+
children: [],
180+
})),
186181
};
187182
return acc.concat(blockParent(cell, [code, outputs]));
188183
}

0 commit comments

Comments
 (0)