Skip to content

Commit

Permalink
markdown: Base.copy for Markdown.MD (#25315)
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin authored and JeffBezanson committed Jan 15, 2018
1 parent 1a416fb commit 11dcd63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/markdown/parse/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Base.setindex!(md::MD, args...) = setindex!(md.content, args...)
Base.endof(md::MD) = endof(md.content)
Base.length(md::MD) = length(md.content)
Base.isempty(md::MD) = isempty(md.content)
Base.copy(md::MD) = MD(copy(md.content), copy(md.meta))

==(a::MD, b::MD) = (html(a) == html(b))

Expand Down
14 changes: 14 additions & 0 deletions test/markdown.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1079,3 +1079,17 @@ t = """
:-- | --:
1 | 2"""
@test sprint(Markdown.term, Markdown.parse(t), 0) == "a b\n– –\n1 2\n"

# test Base.copy
let
md = doc"test"
md′ = copy(md)
@test length(md) == length(md′) == 1
push!(md, "new")
@test length(md) == 2
@test length(md′) == 1

@test !haskey(md.meta, :foo)
md.meta[:foo] = 42
@test !haskey(md′.meta, :foo)
end

2 comments on commit 11dcd63

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong when running your job:

NanosoldierError: failed to run benchmarks against primary commit: failed process: Process(`sudo cset shield -e su nanosoldier -- -c ./benchscript.sh`, ProcessExited(1)) [1]

Logs and partial data can be found here
cc @ararslan

Please sign in to comment.