diff options
author | Georg Brandl <georg@python.org> | 2008-12-29 22:30:00 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-12-29 22:30:00 +0100 |
commit | c5bd95ae02352a05a3899b0cbad8a85a95804935 (patch) | |
tree | 3db2a6af417ddc0a3ad331bbbdc99f9325436f27 /sphinx | |
parent | e51906609b6959386593da6fa2ede65ca9129b62 (diff) | |
download | sphinx-c5bd95ae02352a05a3899b0cbad8a85a95804935.tar.gz |
Another fix for DEDENT/INDENT handling.
Diffstat (limited to 'sphinx')
-rw-r--r-- | sphinx/builders/html.py | 3 | ||||
-rw-r--r-- | sphinx/pycode/__init__.py | 1 | ||||
-rw-r--r-- | sphinx/pycode/pytree.py | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index 4ce30ad8..2bcd54ec 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -37,8 +37,9 @@ except ImportError: except ImportError: json = None - +#: the filename for the inventory of objects INVENTORY_FILENAME = 'objects.inv' +#: the filename for the "last build" file (for serializing builders) LAST_BUILD_FILENAME = 'last_build' diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py index ab34af1c..dd32d470 100644 --- a/sphinx/pycode/__init__.py +++ b/sphinx/pycode/__init__.py @@ -77,6 +77,7 @@ class ClassAttrVisitor(pytree.NodeVisitor): pnode = pnode.get_prev_leaf() if not pnode or pnode.type not in (token.INDENT, token.DEDENT): break + prefix = pnode.get_prefix() docstring = prepare_commentdoc(prefix) if not docstring: return diff --git a/sphinx/pycode/pytree.py b/sphinx/pycode/pytree.py index bd72bc99..46017a95 100644 --- a/sphinx/pycode/pytree.py +++ b/sphinx/pycode/pytree.py @@ -221,8 +221,8 @@ class Leaf(Base): self.prefix = prefix def __repr__(self): - return "%s(%r, %r)" % (self.__class__.__name__, - self.type, self.value) + return "%s(%r, %r, %r)" % (self.__class__.__name__, + self.type, self.value, self.prefix) def __str__(self): """This reproduces the input source exactly.""" |