mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Activate the viewcode extension in the automatically generated apidoc project.
This commit is contained in:
parent
38ebe67c4e
commit
be5dac74a3
@ -301,6 +301,7 @@ Note: By default this script will not overwrite already created files.""")
|
||||
master = 'index',
|
||||
epub = True,
|
||||
ext_autodoc = True,
|
||||
ext_viewcode = True,
|
||||
makefile = True,
|
||||
batchfile = True,
|
||||
mastertocmaxdepth = opts.maxdepth,
|
||||
|
@ -217,6 +217,7 @@ class ModuleAnalyzer(object):
|
||||
pos = self.source.tell()
|
||||
if not decoded:
|
||||
self.encoding = detect_encoding(self.source.readline)
|
||||
self.source.seek(pos)
|
||||
self.code = self.source.read().decode(self.encoding)
|
||||
self.source.seek(pos)
|
||||
self.source = TextIOWrapper(self.source, self.encoding)
|
||||
|
Loading…
Reference in New Issue
Block a user