Skip to content

Commit a314c02

Browse files
committed
Minor fix. to collapse-script after reorg
1 parent d8beab2 commit a314c02

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

collapse-script.jl

+16-14
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,24 @@ function read_tutorials(tutorials_dir)
7171

7272
# Iterate over all files named "tutorial.js" in subdirectories
7373
for subdir in readdir(tutorials_dir)
74-
file_path = joinpath(tutorials_dir, subdir, "tutorial.jl")
75-
if isfile(file_path)
76-
try
77-
file = open(file_path, "r")
78-
content = read(file, String)
79-
close(file)
80-
file = open(file_path, "w")
81-
modified_content = introduce_dropdowns(content)
82-
write(file, modified_content)
83-
close(file)
84-
# Store content in the dictionary
85-
catch e
86-
throw("Error reading file '$file_path': $(e)")
74+
for tutorial_subdir in readdir(joinpath(tutorials_dir, subdir))
75+
file_path = joinpath(tutorials_dir, subdir, tutorial_subdir, "tutorial.jl")
76+
if isfile(file_path)
77+
try
78+
file = open(file_path, "r")
79+
content = read(file, String)
80+
close(file)
81+
file = open(file_path, "w")
82+
modified_content = introduce_dropdowns(content)
83+
write(file, modified_content)
84+
close(file)
85+
# Store content in the dictionary
86+
catch e
87+
throw("Error reading file '$file_path': $(e)")
88+
end
8789
end
8890
end
89-
end
91+
end
9092
end
9193

9294

0 commit comments

Comments
 (0)