include tool desc in the index for all formats

develop
myk002 2022-09-23 13:19:13 -07:00
parent 4ae1b7fb74
commit 50f0d11372
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 4 additions and 1 deletions

@ -260,8 +260,11 @@ def tag_index_generate(self, docnames: Optional[Iterable[str]] = None) -> Tuple[
content = defaultdict(list) content = defaultdict(list)
for name, desc, _, docname, anchor, _ in self.domain.data['objects']: for name, desc, _, docname, anchor, _ in self.domain.data['objects']:
first_letter = name[0].lower() first_letter = name[0].lower()
extra, descr = desc, ''
if self.domain.env.app.builder.format == 'html':
extra, descr = '', desc
content[first_letter].append( content[first_letter].append(
IndexEntry(name, 0, docname, anchor, '', '', desc)) IndexEntry(name, 0, docname, anchor, extra, '', descr))
return (sorted(content.items()), False) return (sorted(content.items()), False)
def register_index(app, tag, title): def register_index(app, tag, title):