Skip to content

Commit

Permalink
Move assets folder along with notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Panagiotis Georgakopoulos committed Dec 3, 2020
1 parent 52f9551 commit 9c3f7a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/notebook/Notebook.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function save_notebook(io, notebook::Notebook)
print(io, c.code)
print(io, _cell_suffix)
end

println(io, _cell_id_delimiter, "Cell order:")
for c in notebook.cells
delim = c.code_folded ? _order_delimiter_folded : _order_delimiter
Expand All @@ -107,7 +107,7 @@ function save_notebook(notebook::Notebook, path::String)
open(path, "w") do io
save_notebook(io, notebook)
end
end
end

save_notebook(notebook::Notebook) = save_notebook(notebook, notebook.path)

Expand Down Expand Up @@ -231,5 +231,8 @@ function move_notebook!(notebook::Notebook, newpath::String)
if oldpath_tame != newpath_tame
rm(oldpath_tame)
end
if isdir("$oldpath_tame.assets")
mv("$oldpath_tame.assets", "$newpath_tame.assets")
end
notebook
end

0 comments on commit 9c3f7a7

Please sign in to comment.