Skip to content

Commit

Permalink
fix: show toc in static export (marimo-team#1885)
Browse files Browse the repository at this point in the history
  • Loading branch information
mscolnick authored Jul 25, 2024
1 parent 6374404 commit 461d6df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/core/cells/cells.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { prepareCellForExecution, transitionCell } from "./cell";
import { store } from "../state/jotai";
import { createReducerAndAtoms } from "../../utils/createReducer";
import { foldAllBulk, unfoldAllBulk } from "../codemirror/editing/commands";
import { findCollapseRange, mergeOutlines } from "../dom/outline";
import { findCollapseRange, mergeOutlines, parseOutline } from "../dom/outline";
import type { CellHandle } from "@/components/editor/Cell";
import { Logger } from "@/utils/Logger";
import { Objects } from "@/utils/objects";
Expand Down Expand Up @@ -143,9 +143,13 @@ function initialNotebookState(): NotebookState {
config: deserializeJson(deserializeBase64(config)),
serializedEditorState: null,
};
const outputMessage = output
? deserializeJson(deserializeBase64(output))
: null;
cellRuntime[cellId] = {
...createCellRuntimeState(),
output: output ? deserializeJson(deserializeBase64(output)) : null,
output: outputMessage,
outline: parseOutline(outputMessage),
consoleOutputs: outputs.map((output) =>
deserializeJson(deserializeBase64(output)),
),
Expand Down

0 comments on commit 461d6df

Please sign in to comment.