Skip to content
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

extra newline displaying markdown objects in REPL #27102

Closed
JeffBezanson opened this issue May 14, 2018 · 3 comments
Closed

extra newline displaying markdown objects in REPL #27102

JeffBezanson opened this issue May 14, 2018 · 3 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects. regression Regression in behavior compared to a previous version REPL Julia's REPL (Read Eval Print Loop)

Comments

@JeffBezanson
Copy link
Member

When getting help for a function, or equivalently just displaying a Markdown object, there are now two newlines at the end of the output.

E.g. 0.6:

help?> Core.eval
  eval([m::Module], expr::Expr)

  Evaluate an expression in the given module and return the result. Every Module (except those defined with baremodule) has its
  own 1-argument definition of eval, which evaluates expressions in that module.

julia> 

and now:

help?> Core.eval
  eval([m::Module], expr::Expr)

  Evaluate an expression in the given module and return the result. Every Module (except those defined with baremodule) has its own
  1-argument definition of eval, which evaluates expressions in that module.


julia> 
@JeffBezanson JeffBezanson added REPL Julia's REPL (Read Eval Print Loop) regression Regression in behavior compared to a previous version display and printing Aesthetics and correctness of printed representations of objects. labels May 14, 2018
@fredrikekre
Copy link
Member

I am pretty sure this is #25067, in particular the change here 88cdf44#diff-e7ece136e201ac8acd4899e1a4af3431R151, which makes it such that we don't sidestep the println here

println(io)
anymore (since we now dispatch to the more generic display function) cc @stevengj

@fredrikekre
Copy link
Member

fredrikekre commented May 15, 2018

Basically, the show method here should not produce a trailing new line:

Base.show(io::IO, ::MIME"text/plain", md::MD) = (term(io, md); nothing)

@stevengj
Copy link
Member

Should be fixed by my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. regression Regression in behavior compared to a previous version REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

3 participants