Skip to content

Commit

Permalink
Update generate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
srdas committed Dec 18, 2024
1 parent 4feb4d1 commit 1b05277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jupyter-ai/jupyter_ai/chat_handlers/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def create_notebook(outline):
nb["cells"].append(nbf.new_code_cell(code_block))

# Post process notebook for hanging cells: merge hanging cell with the previous cell
nb_cells = list()
nb_cells = []
for cell in nb["cells"]:
if (cell["cell_type"] == "code") and (cell["source"][0] == " "):
nb_cells[-1]["source"] = nb_cells[-1]["source"] + "\n\n" + cell["source"]
Expand Down

0 comments on commit 1b05277

Please sign in to comment.