-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display linebreaks, TextDisplay
vs REPLDisplay
#43766
Comments
I guess we should do this. Normally I don't like building in extra trailing line breaks, because they're harder to remove than to add yourself. But given the nature of |
Thanks @JeffBezanson for clarifying that. Basically what I understood for
I'll propose the PR and add some tests. |
I think these line breaks may be necessary here rather than extra. $ julia -e "A = rand(5,5); display(A); display(A)"
5×5 Matrix{Float64}:
0.558617 0.833546 0.534481 0.871176 0.81832
0.667262 0.214333 0.557675 0.469011 0.733549
0.0167319 0.772786 0.532067 0.0182531 0.362664
0.162401 0.175737 0.958528 0.528862 0.0345345
0.28226 0.0938108 0.405553 0.34604 0.9921985×5 Matrix{Float64}:
0.558617 0.833546 0.534481 0.871176 0.81832
0.667262 0.214333 0.557675 0.469011 0.733549
0.0167319 0.772786 0.532067 0.0182531 0.362664
0.162401 0.175737 0.958528 0.528862 0.0345345
0.28226 0.0938108 0.405553 0.34604 0.992198$ I think there may be an extra line break here though: julia> A = rand(5,5); display(A); display(A)
5×5 Matrix{Float64}:
0.649867 0.498648 0.0749694 0.585428 0.645387
0.440297 0.326395 0.558343 0.0917279 0.519926
0.566742 0.573145 7.27435e-6 0.477407 0.418683
0.584659 0.00708769 0.765285 0.346584 0.439672
0.000295367 0.244561 0.787006 0.738048 0.736395
5×5 Matrix{Float64}:
0.649867 0.498648 0.0749694 0.585428 0.645387
0.440297 0.326395 0.558343 0.0917279 0.519926
0.566742 0.573145 7.27435e-6 0.477407 0.418683
0.584659 0.00708769 0.765285 0.346584 0.439672
0.000295367 0.244561 0.787006 0.738048 0.736395
julia> |
On your second example this is just the julia> nothing
julia> println()
julia> |
As explained on discourse, we (ping @mkitti) feel that there might be an inconsistency in
display(...)
betweenTextDisplay
andREPLDisplay
.Does anyone know why there is no trailing newline for
TextDisplay
?Would the following patch be acceptable ?
The text was updated successfully, but these errors were encountered: