I have an AbstractArray type with its own display method that gets called correctly in the REPL but in Jupyter/IJulia whatever function is called to display the last argument in each cell is apparently calling a default display type for AbstractArray rather than my object’s specialized method. What display type function is called at the end of each cell?
Here is a MWE where the exact same code displays differently in the REPL and in IJulia:
Then if you do print(s) it will use the first method, whereas REPL display and IJulia will use the second method, as is explained in the manual.
Note that you want to call print(io, ...) in show, not println(....). First, show output does not typically include a trailing newline (that is added when show is called, e.g. by println). Second, you want to output to the supplied io stream — that way your custom show method can work with streams besides stdout (e.g. output to a file or buffer).