Skip to content

Commit de6e4c6

Browse files
committed
use walkdocs in walk_outputs
1 parent 41f36fd commit de6e4c6

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/MultiDocumenter.jl

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,8 @@ end
7272
function walk_outputs(f, root, docs::Vector{MultiDocRef}, dirs::Vector{String})
7373
for ref in docs
7474
p = joinpath(root, ref.path)
75-
for dir in dirs
76-
dirpath = joinpath(p, dir)
77-
isdir(dirpath) || continue
78-
for (r, _, files) in walkdir(dirpath)
79-
for file in files
80-
file == "index.html" || continue
81-
82-
# +1 for path separator
83-
f(chop(r, head = length(root) + 1, tail = 0), joinpath(r, file))
84-
end
85-
end
86-
break
75+
DocumenterTools.walkdocs(p, fileinfo -> fileinfo.filename == "index.html") do fileinfo
76+
f(fileinfo.relpath, fileinfo.fullpath)
8777
end
8878
end
8979
end

0 commit comments

Comments
 (0)