From 037435f4d7c0198c52e0fa29af0d05f7ee364bc7 Mon Sep 17 00:00:00 2001 From: GabrielKS <23368820+GabrielKS@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:13:18 -0700 Subject: [PATCH] Add `Base.show(::IO, ::System)` --- src/utils/print.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/print.jl b/src/utils/print.jl index 10de3766b6..2233b7c2ae 100644 --- a/src/utils/print.jl +++ b/src/utils/print.jl @@ -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 @@ -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)