Commits

Georg Brandl  committed 92cb646

Activate the viewcode extension in the automatically generated apidoc project.

  • Participants
  • Parent commits 51f7bca

Comments (0)

Files changed (2)

File sphinx/apidoc.py

             master = 'index',
             epub = True,
             ext_autodoc = True,
+            ext_viewcode = True,
             makefile = True,
             batchfile = True,
             mastertocmaxdepth = opts.maxdepth,

File sphinx/pycode/__init__.py

         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)