mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
autodoc: generate directives including domain name.
This commit is contained in:
parent
9101593b01
commit
6769daa80a
@ -390,9 +390,11 @@ class Documenter(object):
|
||||
|
||||
def add_directive_header(self, sig):
|
||||
"""Add the directive header and options to the generated content."""
|
||||
domain = getattr(self, 'domain', 'py')
|
||||
directive = getattr(self, 'directivetype', self.objtype)
|
||||
name = self.format_name()
|
||||
self.add_line(u'.. %s:: %s%s' % (directive, name, sig), '<autodoc>')
|
||||
self.add_line(u'.. %s:%s:: %s%s' % (domain, directive, name, sig),
|
||||
'<autodoc>')
|
||||
if self.options.noindex:
|
||||
self.add_line(u' :noindex:', '<autodoc>')
|
||||
if self.objpath:
|
||||
|
Loading…
Reference in New Issue
Block a user