Skip to content

Commit

Permalink
Add Base.show(::IO, ::System)
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielKS committed Dec 7, 2024
1 parent 9409c32 commit 037435f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Base.summary(sys::System)
return "System (base power $(get_base_power(sys)))"
end

function Base.show(io::IO, ::MIME"text/plain", sys::System)
function Base.show(io::IO, sys::System)
show_system_table(io, sys; backend = Val(:auto))

if IS.get_num_components(sys.data.components) > 0
Expand All @@ -16,6 +16,8 @@ function Base.show(io::IO, ::MIME"text/plain", sys::System)
return
end

Base.show(io::IO, ::MIME"text/plain", sys::System) = show(io, sys)

function Base.show(io::IO, ::MIME"text/html", sys::System)
show_system_table(io, sys; backend = Val(:html), standalone = false)

Expand Down

0 comments on commit 037435f

Please sign in to comment.