diff options
Diffstat (limited to 'sphinx/ext/autosectionlabel.py')
| -rw-r--r-- | sphinx/ext/autosectionlabel.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/autosectionlabel.py b/sphinx/ext/autosectionlabel.py index 4c601b497..db4185331 100644 --- a/sphinx/ext/autosectionlabel.py +++ b/sphinx/ext/autosectionlabel.py @@ -40,12 +40,12 @@ def register_sections_as_label(app, document): labelid = node['ids'][0] docname = app.env.docname title = cast(nodes.title, node[0]) - ref_name = getattr(node[0], 'rawsource', title.astext()) + ref_name = getattr(title, 'rawsource', title.astext()) if app.config.autosectionlabel_prefix_document: name = nodes.fully_normalize_name(docname + ':' + ref_name) else: name = nodes.fully_normalize_name(ref_name) - sectname = clean_astext(node[0]) + sectname = clean_astext(title) if name in labels: logger.warning(__('duplicate label %s, other instance in %s'), |
