From 8e6b12b9d95e83128eea45f423419c88a979cb46 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Wed, 18 Apr 2018 12:52:39 +0200 Subject: [PATCH] replace \ with / in writer instead of tests --- src/Examples.jl | 2 +- test/runtests.jl | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Examples.jl b/src/Examples.jl index 2caaffc..1276f78 100644 --- a/src/Examples.jl +++ b/src/Examples.jl @@ -221,7 +221,7 @@ function markdown(inputfile, outputdir; preprocess = identity, postprocess = ide pkg = first(split(last(split(repo, '/')), '.')) content = """ #' ```@meta - #' EditURL = "@__REPO_ROOT_URL__$(relpath(inputfile, Pkg.dir(pkg)))" + #' EditURL = "@__REPO_ROOT_URL__$(replace(relpath(inputfile, Pkg.dir(pkg)), "\\" => "/"))" #' ``` """ * content diff --git a/test/runtests.jl b/test/runtests.jl index 7705521..e4e18ce 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -207,7 +207,6 @@ content = """ """ script = read(joinpath(outdir, "inputfile.jl"), String) - script = replace(script, "\\" => "/") # normalize \ to / on Windows @test script == expected_script # no tag -> latest directory @@ -305,12 +304,11 @@ end Some math: ```math - /int f(x) dx + \\int f(x) dx ``` """ markdown = read(joinpath(outdir, "inputfile.md"), String) - markdown = replace(markdown, "\\" => "/") # normalize \ to / on Windows @test markdown == expected_markdown # no tag -> latest directory @@ -487,7 +485,6 @@ end " \"name\": \"julia-", " \"display_name\": \"Julia ", " \"language\": \"julia\"") @test contains(notebook, metadata) end - # notebook = replace(notebook, "\\" => "/") # normalize \ to / on Windows # no tag -> latest directory withenv("TRAVIS_REPO_SLUG" => "fredrikekre/Examples.jl",