Skip to content

Commit 6361153

Browse files
committed
Simplify option handling for notebooks
1 parent 63fcd10 commit 6361153

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

src/core/handlers/include-notebook.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export function parseNotebookPath(path: string) {
7070

7171
export function notebookForInclude(
7272
nbInclude: NotebookInclude,
73-
context: RenderContext,
7473
) {
7574
const nb = jupyterFromFile(nbInclude.path);
7675
const cells: JupyterCell[] = [];
@@ -99,24 +98,6 @@ export function notebookForInclude(
9998
}
10099
nb.cells = cells;
101100
}
102-
103-
// Read any notebook metadata
104-
const notebookMetadata = context.format.metadata["notebook"] as Record<
105-
string,
106-
unknown
107-
>;
108-
109-
// Resolve any execution options from the notebook metadata
110-
nb.cells = nb.cells.map((cell) => {
111-
cell.metadata = {
112-
"echo": false,
113-
"warning": false,
114-
...notebookMetadata,
115-
...cell.metadata,
116-
};
117-
return cell;
118-
});
119-
120101
return nb;
121102
}
122103

src/core/handlers/include.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const includeHandler: LanguageHandler = {
6060
// the cells that are specified in the include and include them)
6161
const nb = notebookForInclude(
6262
notebookInclude,
63-
handlerContext.options.context,
6463
);
6564
const assets = jupyterAssets(
6665
source,

0 commit comments

Comments
 (0)