Skip to content

Commit 9f5b498

Browse files
committed
make sure printing takes context into account
1 parent bd63d55 commit 9f5b498

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/stopping_criterion.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function Base.show(io::IO, ::MIME"text/plain", stop_when_all::StopWhenAll)
156156
print(io, "StopWhenAll with the Stopping Criteria:")
157157
for stopping_criterion in stop_when_all.criteria
158158
print(io, "\n ")
159-
replace(io, string(stopping_criterion), "\n" => "\n ") #increase indent
159+
replace(io, sprint(show, stopping_criterion; context = io), "\n" => "\n ") #increase indent
160160
end
161161
return nothing
162162
end
@@ -207,7 +207,7 @@ function Base.show(io::IO, ::MIME"text/plain", stop_when_any::StopWhenAny)
207207
print(io, "StopWhenAny with the Stopping Criteria:")
208208
for stopping_criterion in stop_when_any.criteria
209209
print(io, "\n ")
210-
replace(io, string(stopping_criterion), "\n" => "\n ") #increase indent
210+
replace(io, sprint(show, stopping_criterion; context = io), "\n" => "\n ") #increase indent
211211
end
212212
return nothing
213213
end

0 commit comments

Comments
 (0)