Skip to content

Commit

Permalink
Markdown stdlib (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre authored and ararslan committed Feb 16, 2018
1 parent 083c291 commit da17235
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ IterativeEigensolvers = "de555fa4-b82f-55e7-8b71-53f60bbc027d"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
Pkg = "fe1c5a76-5840-53d2-82f9-288dd83ce2ce"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ Currently, the `@compat` macro supports the following syntaxes:
* `using Compat.UUIDs` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25819]).

* `using Compat.Markdown` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25738]).

## New functions, macros, and methods

* `@views` takes an expression and converts all slices to views ([#20164]), while
Expand Down
6 changes: 6 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,12 @@ else
import Random
end

if VERSION < v"0.7.0-DEV.3589"
const Markdown = Base.Markdown
else
import Markdown
end

if VERSION < v"0.7.0-DEV.2609"
@eval module SuiteSparse
if Base.USE_GPL_LIBS
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1408,4 +1408,8 @@ module TestUUIDs
@test uuid4() isa UUID
end

# 0.7.0-DEV.3589
import Compat.Markdown
@test isa(Markdown.parse("foo"), Markdown.MD)

nothing

0 comments on commit da17235

Please sign in to comment.