Opened 6 years ago

Closed 6 years ago

#2545 closed defect (fixed)

Bad HTML anchors in help for multi-word commands

Reported by: Tristan Croll Owned by: Greg Couch
Priority: moderate Milestone:
Component: Help System Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Adding command documentation for ISOLDE to work with the new framework... the command isolde restrain distances is currently defined with isolde as one command level, and restrain distances as the next. If I type usage isolde restrain distances the link printed to the log has a space in the anchor: help:user/commands/isolde.html#restrain distances.

Firstly: I'm not sure this is actually valid HTML? In any case, Sphinx won't let me specify an anchor with a space. If I specify in the RestructuredText:

.. _`restrain distances`:

isolde restrain distances
=========================

... the space is converted to a hyphen in the final HTML. Of course, I can rearrange my command specifications so that there are no multi-word command levels (since there will eventually be other isolde restrain ... commands that would actually be very sensible in this case), but this still feels bug-like to me.

Change History (2)

in reply to:  1 ; comment:1 by Tristan Croll, 6 years ago

Oh - seems things don't work as I assumed. I thought that if I first 
added the command "isolde restrain" as a stub, then "isolde restrain 
distances" would register as a subcommand of that. But now I see that 
doesn't happen.

On 2019-11-06 13:29, ChimeraX wrote:

comment:2 by Greg Couch, 6 years ago

Resolution: fixed
Status: assignedclosed

If Sphinx doesn't use anchors with spaces and uses hyphens, then ChimeraX should follow that convention. So I've changed the code to use hyphens.

Note: See TracTickets for help on using tickets.