diff --git a/src/Writers/HTMLWriter.jl b/src/Writers/HTMLWriter.jl index 1910ed4e2e..3a075fd0a0 100644 --- a/src/Writers/HTMLWriter.jl +++ b/src/Writers/HTMLWriter.jl @@ -479,23 +479,18 @@ end function generate_version_file(dir::AbstractString) named_folders = [] - release_folders = [] tag_folders = [] for each in readdir(dir) each in ("stable", "latest") ? push!(named_folders, each) : - occursin(r"release\-\d+\.\d+", each) ? push!(release_folders, each) : occursin(Base.VERSION_REGEX, each) ? push!(tag_folders, each) : nothing end # put stable before latest sort!(named_folders, rev = true) # sort tags by version number sort!(tag_folders, lt = (x, y) -> VersionNumber(x) < VersionNumber(y), rev = true) - # sort release- folders by version number - vnum(x) = VersionNumber(match(r"release\-(\d+\.\d+)", x)[1]) - sort!(release_folders, lt = (x, y) -> vnum(x) < vnum(y), rev = true) open(joinpath(dir, "versions.js"), "w") do buf println(buf, "var DOC_VERSIONS = [") - for group in (named_folders, tag_folders, release_folders) + for group in (named_folders, tag_folders) for folder in group println(buf, " \"", folder, "\",") end diff --git a/test/htmlwriter.jl b/test/htmlwriter.jl index 8d4b34477c..9a754cc596 100644 --- a/test/htmlwriter.jl +++ b/test/htmlwriter.jl @@ -22,7 +22,7 @@ import Documenter.Writers.HTMLWriter: jsescape, generate_version_file @test jsescape("policy to
 delete.") == "policy to\\u2028 delete." mktempdir() do tmpdir - versions = ["stable", "latest", "v0.2.6", "v0.1.1", "v0.1.0", "release-0.2", "release-0.1"] + versions = ["stable", "latest", "v0.2.6", "v0.1.1", "v0.1.0"] cd(tmpdir) do mkdir("foobar") for version in versions