diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-12 19:01:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-12 19:01:36 +0300 |
commit | 233e359330759a6f338354d8912b71a9eef23499 (patch) | |
tree | f24ba04898d11bbf27fb6752baf10ceeadf5f277 /sphinx/domains | |
parent | e314789f4fc8cf12717c2abfc531b6b195c9c50d (diff) | |
parent | 12ec8f0caea1e12d39d1bd27c7fa3eba5d284bc1 (diff) |
Merge pull request #8679 from tk0miya/8651_xref_for_rubric
Fix #8651: cross-reference for a rubric having inline item is broken
Diffstat (limited to 'sphinx/domains')
-rw-r--r-- | sphinx/domains/std.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py index 33acdb3f5..b936a8d19 100644 --- a/sphinx/domains/std.py +++ b/sphinx/domains/std.py @@ -745,9 +745,11 @@ class StandardDomain(Domain): name, env.doc2path(self.labels[name][0]), location=node) self.anonlabels[name] = docname, labelid - if node.tagname in ('section', 'rubric'): + if node.tagname == 'section': title = cast(nodes.title, node[0]) sectname = clean_astext(title) + elif node.tagname == 'rubric': + sectname = clean_astext(node) elif self.is_enumerable_node(node): sectname = self.get_numfig_title(node) if not sectname: |