mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-12 16:32:10 -05:00
Fix the source positions referenced by the "viewcode" extension.
This commit is contained in:
1 parent
975f9c7eaa
commit
5bff67432e
2 files changed
+3
No files matched your search
@@ -3,6 +3,8 @@ Release 1.0.9 (in development)
|
|||||||
|
|
||||||
* #778: Fix "hide search matches" link on pages linked by search.
|
* #778: Fix "hide search matches" link on pages linked by search.
|
||||||
|
|
||||||
|
* Fix the source positions referenced by the "viewcode" extension.
|
||||||
|
|
||||||
|
|
||||||
Release 1.0.8 (Sep 23, 2011)
|
Release 1.0.8 (Sep 23, 2011)
|
||||||
============================
|
============================
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ class ModuleAnalyzer(object):
|
|||||||
# cache the source code as well
|
# cache the source code as well
|
||||||
pos = self.source.tell()
|
pos = self.source.tell()
|
||||||
self.encoding = detect_encoding(self.source.readline)
|
self.encoding = detect_encoding(self.source.readline)
|
||||||
|
self.source.seek(pos)
|
||||||
self.code = self.source.read()
|
self.code = self.source.read()
|
||||||
self.source.seek(pos)
|
self.source.seek(pos)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user