Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Compat for Markdown/Pkg imports #57

Merged
merged 1 commit into from
Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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