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

[manpage] don't emit OSC 8 hyperlinks for anchor references (#12108) #12260

Merged
merged 1 commit into from Apr 29, 2024

Commits on Apr 28, 2024

  1. [manpage] don't emit OSC 8 hyperlinks for anchor references (sphinx-d…

    …oc#12108)
    
    A reference like ":ref:`Some other page <some-other-page>`" results
    in a refuri "#some-other-page".  This does not seem useful to readers
    of the man page. It is especially unhelpful when using a terminal
    that implements a hint mode for selecting links -- the extra links
    add noise, making it harder to select the interesting ones.
    Don't emit OSC 8 for those.
    Also don't emit it for URLs that might be unsafe
    (see sphinx-doc#12260 (comment))
    I don't know one that would be unsafe but I'm sure there are some.
    
    OTOH, "man_show_urls" doesn't seem unsafe because it shows the exact
    URL that will be opened, so enable that for all URLs (except for
    relative ones).
    
    Follow up to sphinx-doc#12108
    
    I also confirmed that even with docutils 0.21 we do not need to
    override depart_reference because we already skip reference nodes.
    krobelus committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    32e589e View commit details
    Browse the repository at this point in the history