We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e3b8de commit c3b708bCopy full SHA for c3b708b
src/core/jupyter/jupyter-fixups.ts
@@ -120,9 +120,14 @@ export function fixupFrontMatter(nb: JupyterNotebook): JupyterNotebook {
120
// look for the first raw block that has a yaml object
121
let partitioned: { yaml: string; markdown: string } | undefined;
122
const frontMatterCellIndex = nb.cells.findIndex((cell) => {
123
- if (cell.cell_type === "raw") {
+ if (cell.cell_type === "raw" || cell.cell_type === "markdown") {
124
partitioned = partitionYamlFrontMatter(cell.source.join("")) || undefined;
125
- return !!partitioned;
+ if (partitioned) {
126
+ cell.cell_type = "raw";
127
+ return true;
128
+ } else {
129
+ return false;
130
+ }
131
}
132
});
133
0 commit comments