JuliaDocs / DocumenterInterLinks.jl

A plugin for Documenter.jl that enables linking between projects
http://juliadocs.org/DocumenterInterLinks.jl/
MIT License
21 stars 1 forks source link

Rendering @extref on Julia REPL #12

Open kellertuer opened 3 weeks ago

kellertuer commented 3 weeks ago

I am working a bit on keyword arguments and mentioning their defaults. I noticed that [`Example`](@ref) is rendered nicely on REPL, while @extref ones are not. Could this be fixed by defining a certain show Method?

Example: If we have ManifoldsBase.jl in the Documenter plugin like

links = InterLinks(
    "ManifoldsBase" => ("https://juliamanifolds.github.io/ManifoldsBase.jl/stable/"),
)

and define somewhere in a doctoring

"""
* `X = ` [`zero_vector`](@extref `ManifoldsBase.zero_vector-Tuple{AbstractManifold, Any}`)`(M,p)` :
  specify a memory internally to store the gradient
"""
function foo end

its docs on help?> foo look like

  •  X = zero_vector (@extref `ManifoldsBase.zero_vector-Tuple{AbstractManifold, Any}`)(M,p):   specify a memory internally to store the gradient

while I would prefer them to look like (as is done for @refs

  •  X = zero_vector (M,p):   specify a memory internally to store the gradient

(zero_vector is light blue since it is a link in REPL)

kellertuer commented 1 week ago

this seems to be fixed on Julia master, as far as I understood the code (after @fredrikekre helped me find it).

On Julia. 1.10 only @ref is turned into a blank link on REPL, see

https://github.com/JuliaLang/julia/blob/48d4fd48430af58502699fdf3504b90589df3852/stdlib/Markdown/src/render/terminal/render.jl#L162

while on current master with https://github.com/JuliaLang/julia/blob/222231f047462bcb2cef3e402c86cf41df82414d/stdlib/Markdown/src/render/terminal/render.jl#L195-L202

This issue might be resolved. Let's still keep this open until we know it is resolved (in maybe 1.11 or 1.12)