diff --git a/src/eo_datascience/clean_nb.py b/src/eo_datascience/clean_nb.py index 3262e21..a62f4ad 100644 --- a/src/eo_datascience/clean_nb.py +++ b/src/eo_datascience/clean_nb.py @@ -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): @@ -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: