Skip to content

Commit 8f081b5

Browse files
authored
Merge pull request #62 from JuliaDocs/backports-0.4.5
Backports for 0.4.5
2 parents cc83610 + 44be7fc commit 8f081b5

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ os:
66

77
julia:
88
- 0.6
9+
- 0.7
910
- nightly
1011

1112
notifications:

appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
environment:
22
matrix:
3+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
34
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
5+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
6+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
7+
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
48
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
59

610
branches:

src/templates.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ end
8282

8383
function template(source::LineNumberNode, mod::Module, tuple::Expr, docstr::Union{Symbol, Expr})
8484
Meta.isexpr(tuple, :tuple) || error("invalid `@template` syntax on LHS.")
85-
isdefined(mod, TEMP_SYM) || eval(mod, :(const $(TEMP_SYM) = $(Dict{Symbol, Vector}())))
85+
isdefined(mod, TEMP_SYM) || Core.eval(mod, :(const $(TEMP_SYM) = $(Dict{Symbol, Vector}())))
8686
local block = Expr(:block)
8787
for category in tuple.args
8888
local key = Meta.quot(category)

src/utilities.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,16 @@ $(:SIGNATURES)
169169
Remove the `Pkg.dir` part of a file `path` if it exists.
170170
"""
171171
function cleanpath(path::AbstractString)
172-
local pkgdir = joinpath(Compat.Pkg.dir(), "")
173-
return startswith(path, pkgdir) ? first(split(path, pkgdir; keep = false)) : path
172+
@static if VERSION >= v"0.7.0-DEV.5183"
173+
for depot in DEPOT_PATH
174+
pkgdir = joinpath(depot, "")
175+
startswith(path, pkgdir) && return first(split(path, pkgdir, keepempty=false))
176+
end
177+
return path
178+
else
179+
pkgdir = joinpath(Compat.Pkg.dir(), "")
180+
return startswith(path, pkgdir) ? first(split(path, pkgdir; keep = false)) : path
181+
end
174182
end
175183

176184
"""

test/tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ end
145145
str = String(take!(buf))
146146
@test occursin("```julia", str)
147147
@test occursin("f(x)", str)
148-
@test occursin("[`$(joinpath("DocStringExtensions", "test", "tests.jl"))", str)
148+
@test occursin(joinpath("test", "tests.jl"), str)
149149
end
150150

151151
@testset "method signatures" begin

0 commit comments

Comments
 (0)