Skip to content

Commit 2474a70

Browse files
authored
fix show for QuotientSpace (#123)
* fix show for QuotientSpace * permit kw in show for operators * disable header in text/plain
1 parent 39a8b85 commit 2474a70

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.6.0"
3+
version = "0.6.1"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/show.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct PrintShow
3838
end
3939
Base.show(io::IO,N::PrintShow) = print(io,N.str)
4040

41-
show(io::IO, B::Operator) = summary(io, B)
41+
show(io::IO, B::Operator; kw...) = summary(io, B)
4242

4343
function show(io::IO, ::MIME"text/plain", B::Operator;header::Bool=true)
4444
header && summary(io, B)
@@ -120,7 +120,13 @@ end
120120
function show(io::IO,s::QuotientSpace)
121121
show(io,s.space)
122122
print(io," /\n")
123-
show(io,s.bcs;header=false)
123+
show(io,s.bcs)
124+
end
125+
126+
function show(io::IO, m::MIME"text/plain", s::QuotientSpace)
127+
show(io,s.space)
128+
print(io," /\n")
129+
show(io, m, s.bcs, header = false)
124130
end
125131

126132

test/show.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,13 @@
3737
show(io, MIME"text/plain"(), D)
3838
@test contains(String(take!(io)), dsum)
3939
end
40+
@testset "QuotientSpace" begin
41+
Q = QuotientSpace(Dirichlet(ConstantSpace(0..1)))
42+
@test startswith(repr(Q), "ConstantSpace(0..1) /")
43+
io = IOBuffer()
44+
show(io, MIME"text/plain"(), Q)
45+
s = String(take!(io))
46+
@test startswith(s, "ConstantSpace(0..1) /")
47+
end
4048
end
4149
end

0 commit comments

Comments
 (0)