Skip to content

Commit

Permalink
Merge pull request #785 from jishnub/showfix
Browse files Browse the repository at this point in the history
Fix `show` for `QuotientSpace`
  • Loading branch information
jishnub authored Jul 28, 2022
2 parents 7968dab + d55e833 commit e4787f2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ApproxFun"
uuid = "28f2ccd6-bb30-5033-b560-165f7b14dc2f"
version = "0.13.4"
version = "0.13.5"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
10 changes: 8 additions & 2 deletions src/Extras/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ end
function show(io::IO,s::QuotientSpace)
show(io,s.space)
print(io," /\n")
show(io,s.bcs;header=false)
show(io,s.bcs)
end

function show(io::IO, m::MIME"text/plain", s::QuotientSpace)
show(io,s.space)
print(io," /\n")
show(io, m, s.bcs, header = false)
end


Expand Down Expand Up @@ -191,7 +197,7 @@ struct PrintShow
end
Base.show(io::IO,N::PrintShow) = print(io,N.str)

show(io::IO, B::Operator) = summary(io, B)
show(io::IO, B::Operator; kw...) = summary(io, B)

function show(io::IO, ::MIME"text/plain", B::Operator;header::Bool=true)
header && println(io, summarystr(B))
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,10 @@ end

@test summary(io, ApproxFun.ArraySpace(Chebyshev(), 2)) isa Nothing
@test contains(String(take!(io)), "ArraySpace")

Q = QuotientSpace(Dirichlet(Chebyshev()))
@test startswith(repr(Q), "Chebyshev() /")
show(io, MIME"text/plain"(), Q)
s = String(take!(io))
@test startswith(s, "Chebyshev() /")
end

2 comments on commit e4787f2

@jishnub
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/65208

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.13.5 -m "<description of version>" e4787f27139e994d6d05a14d3169eec7f80cf00a
git push origin v0.13.5

Please sign in to comment.