If the ref is named the same as the headline (once normalized), sphinx
will return a 'idX' value in node['ids'][1] which we use for the label
ID. The headline is always present at index 0.
Checking for that and using index 0 in case we do get a 'idX' helps us
to avoid using the 'idX' as keys in our OnlineHelpInfo.js and actually
use the intended key.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This is a temporary hack until we find a sensible way to scan the
proxmox-widget-toolkit JS files as well.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
It can happen, that a title is defined as term in the following way:
:term:`My title`
This patch checks for it and strips the leading part and the last `.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
previously it looked for the first instance. this behavior
became an issue while trying to add multiple onlineHelp buttons
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
goes through the sections in the documents and creates the
OnlineHelpInfo.js file from the explicitly defined section labels which
are used in the js files with 'onlineHelp' variable.