Skip to content

Commit 172157b

Browse files
committed
fix tests
1 parent 8da461f commit 172157b

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/generate.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ function makedemos(source::String, templates::Union{Dict, Nothing} = nothing;
145145
if isnothing(templates)
146146
out_path = walkpage(page; flatten=false) do dir, item
147147
joinpath(
148-
relpath(dir, root),
148+
basename(source),
149+
relpath(dir, page_root),
149150
splitext(basename(item))[1] * ".md"
150151
)
151152
end

src/preview.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ function rewrite_localremote_path(page_dir, build_dir)
250250
config = JSON.parsefile(src_config_path)
251251
config["remote"][card.name] = card.path
252252

253+
# Ref: https://discourse.julialang.org/t/find-what-has-locked-held-a-file/23278/2
254+
Base.Sys.iswindows() && GC.gc()
253255
open(src_config_path, "w") do io
254256
JSON.print(io, config)
255257
end

src/types/card.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
abstract type AbstractDemoCard end
22

3+
"""
4+
UnmatchedCard(path)
5+
6+
A dummy placeholder card for files that DemoCards doesn't support
7+
yet. No operation will be applied on this type of file, except for
8+
warnings.
9+
"""
310
struct UnmatchedCard <: AbstractDemoCard
411
path::String
512
end

0 commit comments

Comments
 (0)