Closed MichaelHatherly closed 3 years ago
Hi @MichaelHatherly, thanks for the PR! This seems like a reasonable change and I can't think of any cases I was specifically targeting with my use of repr
. Can you think of any significant cases where the two differ?
There shouldn't be a difference. The implementation uses show
underneath (https://github.com/JuliaLang/julia/blob/76106100559e6dc61769cdbd3d53836e22ffa5e9/base/multimedia.jl#L147-L166) so they should be equivalent. It's possible to pass a context
through repr
, but I didn't go that route since it seems like unnecessary extra calls for the same effect.
OK, I'll merge this PR since it passes tests and looks like repr
delegates back to show
.
Allows for passing
IOContext
through to underlyingshow
methods for arbitary types embedded in the dom. This doesn't appear to cause any tests to fail, but given the direct reference torepr
in the comment above this method I'm not 100% whether the fix here does actually cause issues, though I'd assume it wouldn't...Some context for the issue: I've got types embedded in hyperscript dom elements where their
show
methods depend on information carried through in anIOContext
, usingrepr
here discards the context.