|
|
@ -78,8 +78,12 @@ def _get_toc_reference(node, toc, docname):
|
|
|
|
toc_reference = _find_toc_node(toc, ref_id, nodes.section)
|
|
|
|
toc_reference = _find_toc_node(toc, ref_id, nodes.section)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
# Desc node
|
|
|
|
# Desc node
|
|
|
|
ref_id = node.children[0].attributes['ids'][0]
|
|
|
|
try:
|
|
|
|
toc_reference = _find_toc_node(toc, ref_id, addnodes.desc)
|
|
|
|
ref_id = node.children[0].attributes['ids'][0]
|
|
|
|
|
|
|
|
toc_reference = _find_toc_node(toc, ref_id, addnodes.desc)
|
|
|
|
|
|
|
|
except IndexError as e:
|
|
|
|
|
|
|
|
print('Invalid desc node: %s' % e)
|
|
|
|
|
|
|
|
toc_reference = None
|
|
|
|
|
|
|
|
|
|
|
|
return toc_reference
|
|
|
|
return toc_reference
|
|
|
|
|
|
|
|
|
|
|
@ -108,8 +112,8 @@ def add_domain_to_toctree(app, doctree, docname):
|
|
|
|
for desc_node in doctree.traverse(addnodes.desc):
|
|
|
|
for desc_node in doctree.traverse(addnodes.desc):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
ref_id = desc_node.children[0].attributes['ids'][0]
|
|
|
|
ref_id = desc_node.children[0].attributes['ids'][0]
|
|
|
|
except IndexError, e:
|
|
|
|
except IndexError as e:
|
|
|
|
print 'Invalid desc node: %s' % e
|
|
|
|
print('Invalid desc node: %s' % e)
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
# Python domain object
|
|
|
|
# Python domain object
|
|
|
|