Skip to content

Commit

Permalink
Use Compat for Markdown/Pkg imports (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi authored Mar 26, 2018
1 parent 3fb4c3d commit 6f47a2d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/DocStringExtensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ module DocStringExtensions
# Imports.

using Compat
@static if VERSION >= v"0.7.0-DEV.3656" using Pkg end


# Exports.
Expand Down
2 changes: 1 addition & 1 deletion src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ $(:SIGNATURES)
Remove the `Pkg.dir` part of a file `path` if it exists.
"""
function cleanpath(path::AbstractString)
local pkgdir = joinpath(Pkg.dir(), "")
local pkgdir = joinpath(Compat.Pkg.dir(), "")
return startswith(path, pkgdir) ? first(split(path, pkgdir; keep = false)) : path
end

Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using DocStringExtensions
using Compat.Test
@static if VERSION >= v"0.7.0-DEV.3589" using Markdown end

include("tests.jl")
2 changes: 1 addition & 1 deletion test/tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ end
end
end
@testset "templates" begin
let fmt = expr -> Markdown.plain(eval(:(@doc $expr)))
let fmt = expr -> Compat.Markdown.plain(eval(:(@doc $expr)))
@test occursin("(DEFAULT)", fmt(:(TemplateTests.K)))
@test occursin("(TYPES)", fmt(:(TemplateTests.T)))
@test occursin("(METHODS, MACROS)", fmt(:(TemplateTests.f)))
Expand Down

0 comments on commit 6f47a2d

Please sign in to comment.