mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Prevent indexing commands from causing a paragraph break in Texinfo.
This commit is contained in:
parent
584dc31883
commit
a78b9ec927
@ -1193,10 +1193,15 @@ class TexinfoTranslator(nodes.NodeVisitor):
|
||||
self.body.append('}')
|
||||
|
||||
def visit_index(self, node):
|
||||
# terminate the line but don't prevent paragraph breaks
|
||||
if isinstance(node.parent, nodes.paragraph):
|
||||
self.ensure_eol()
|
||||
else:
|
||||
self.body.append('\n')
|
||||
for entry in node['entries']:
|
||||
typ, text, tid, text2 = entry
|
||||
text = self.escape_menu(text)
|
||||
self.body.append('\n@geindex %s\n' % text)
|
||||
self.body.append('@geindex %s\n' % text)
|
||||
|
||||
def visit_refcount(self, node):
|
||||
self.body.append('\n')
|
||||
|
Loading…
Reference in New Issue
Block a user