diff --git a/frontend/src/components/editor/cell/code/cell-editor.tsx b/frontend/src/components/editor/cell/code/cell-editor.tsx index 1bc6c321ee0..e18b5ea4f7b 100644 --- a/frontend/src/components/editor/cell/code/cell-editor.tsx +++ b/frontend/src/components/editor/cell/code/cell-editor.tsx @@ -157,7 +157,7 @@ const CellEditorInternal = ({ const toggleHideCode = useEvent(() => { // Use cellConfig.hide_code instead of hidden, since it may be temporarily shown const nextHidden = !cellConfig.hide_code; - + // For markdown cells, ensure the cell is run before hiding if (nextHidden && languageAdapter === "markdown") { runCell();