Skip to content

Commit

Permalink
fix callout note return
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchobben committed Nov 25, 2024
1 parent 53961f4 commit 57e0567
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/eo_datascience/clean_nb.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ def convert_callout_notes(dir="./notebooks", save=True):
for i in range(len(nb.cells)):
if nb.cells[i]["cell_type"] == "markdown":
nb.cells[i].source = quarto_note_replace(nb.cells[i].source)

# Save the notebook
if save:
nbformat.write(nb, nb_path)
else:
return nb
if save:
nbformat.write(nb, nb_path)
else:
return nb


def quarto_note_replace(quarto):
Expand Down Expand Up @@ -96,6 +94,7 @@ def convert_refs(dir="./notebooks", save=True):
nb.cells[i].source = quarto_ref_figure_replace(nb.cells[i].source)
nb.cells[i].source = quarto_ref_person_replace(nb.cells[i].source)
nb.cells[i].source = quarto_ref_time_replace(nb.cells[i].source)
nb

# Save the notebook
if save:
Expand Down

0 comments on commit 57e0567

Please sign in to comment.