KristofferC / OhMyREPL.jl

Syntax highlighting and other enhancements for the Julia REPL
https://kristofferc.github.io/OhMyREPL.jl/latest/
Other
746 stars 57 forks source link

Remove traling newline in Markdown code blocks #336

Closed Keluaa closed 4 days ago

Keluaa commented 6 months ago

This PR makes OhMyREPL match exactly the default Markdown formatting of the stdlib when OhMyREPL.HIGHLIGHT_MARKDOWN[] == false.

Formatted code in REPL help is then a bit more compact, with the downside that it might be a tad harder to make the difference between the output of a code example and text.

Before:

julia> using Markdown

julia> md"""
       A
       ```julia
       function a() end
   B
   """

A

function a() end

B

julia> using OhMyREPL

julia> md""" A

       function a() end
   B
   """

A

function a() end

B


After:
```julia
julia> using Markdown, OhMyREPL

julia> md"""
       A
       ```julia
       function a() end
   B
   """

A

function a() end

B