From b8aae10fe52bd7d545047d5064badabb1dd5b3ff Mon Sep 17 00:00:00 2001
From: Fredrik Ekre <fredrik.ekre@chalmers.se>
Date: Fri, 16 Feb 2018 11:12:57 +0100
Subject: [PATCH] Markdown stdlib

---
 Project.toml     | 1 +
 README.md        | 3 +++
 src/Compat.jl    | 6 ++++++
 test/runtests.jl | 4 ++++
 4 files changed, 14 insertions(+)

diff --git a/Project.toml b/Project.toml
index edcf34388..bef29d882 100644
--- a/Project.toml
+++ b/Project.toml
@@ -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"
diff --git a/README.md b/README.md
index e8a29e904..30ae93407 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/src/Compat.jl b/src/Compat.jl
index 05b4f3ae7..fb313665c 100644
--- a/src/Compat.jl
+++ b/src/Compat.jl
@@ -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
diff --git a/test/runtests.jl b/test/runtests.jl
index 431f73c19..e750efee9 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -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