From 0908c23ef067d7b946e7e3fbe9847f86fea582ce Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 6 Jan 2011 18:28:42 +0100 Subject: [PATCH] Fix regressions introduced with #556 fix: explicitly add line break in the index visitor if the index node is a block one. --- CHANGES | 2 ++ sphinx/directives/other.py | 1 + sphinx/writers/latex.py | 2 ++ 3 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 323451cb78..9205b49acb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ Release 1.0.7 (in development) ============================== +* Fix regression of LaTeX output with the fix of #556. + * #568: Fix lookup of class attribute documentation on descriptors so that comment documentation now works. diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index c798f579d2..873fef0468 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -163,6 +163,7 @@ class Index(Directive): self.state.document.note_explicit_target(targetnode) indexnode = addnodes.index() indexnode['entries'] = ne = [] + indexnode['inline'] = False for entry in arguments: entry = entry.strip() for type in pairindextypes: diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 66b511a8a1..3bed28ff9d 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1059,6 +1059,8 @@ class LaTeXTranslator(nodes.NodeVisitor): self.body.append('\n\\end{flushright}\n') def visit_index(self, node, scre=re.compile(r';\s*')): + if not node.get('inline'): + self.body.append('\n') entries = node['entries'] for type, string, tid, _ in entries: if type == 'single':