]> git.proxmox.com Git - proxmox-backup.git/commit
docs/scanrefs: fix handling if ref is same as headline
authorAaron Lauterer <a.lauterer@proxmox.com>
Fri, 5 Feb 2021 15:10:30 +0000 (16:10 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 6 Feb 2021 06:49:21 +0000 (07:49 +0100)
commit777690a121efeab1a6a169dd2866673e144248db
treeeb84af1c86bd416092a9d97772f5ede967384d41
parenta98e2287664f706010747e1a5de5f49fd30354bc
docs/scanrefs: fix handling if ref is same as headline

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>
docs/_ext/proxmox-scanrefs.py