Skip to content

Commit

Permalink
fix new line in printing
Browse files Browse the repository at this point in the history
  • Loading branch information
ogauthe committed May 30, 2024
1 parent 00b2172 commit d30c320
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions NDTensors/src/lib/Sectors/src/category_definitions/su.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ function Base.show(io::IO, s::SU)
end

# display SU(N) irrep as a Young tableau with utf8 box char
function Base.show(io::IO, ::MIME"text/plain", s::SU{N}) where {N}
l = category_label(s)
if l[1] == 0 # singlet = no box
println(io, "")
return nothing
function Base.show(io::IO, ::MIME"text/plain", s::SU)
if istrivial(s) # singlet = no box
return print(io, "")
end

N = groupdim(s)
l = category_label(s)
println(io, "┌─" * "┬─"^(l[1] - 1) * "")
i = 1
while i < N - 1 && l[i + 1] != 0
Expand Down Expand Up @@ -103,8 +103,7 @@ function Base.show(io::IO, s::SU{2})
end

function Base.show(io::IO, ::MIME"text/plain", s::SU{2})
print(io, "S = ", HalfIntegers.half(quantum_dimension(s) - 1))
return nothing
return print(io, "S = ", HalfIntegers.half(quantum_dimension(s) - 1))
end

#
Expand Down

0 comments on commit d30c320

Please sign in to comment.