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

Rendering @extref on Julia REPL #12

Open
kellertuer opened this issue Jun 9, 2024 · 1 comment
Open

Rendering @extref on Julia REPL #12

kellertuer opened this issue Jun 9, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kellertuer
Copy link

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)

@goerz goerz added enhancement New feature or request help wanted Extra attention is needed labels Jun 9, 2024
@kellertuer
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants